mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-16 14:46:28 +02:00
- Fixed wrong unsetting of variables introduced in phpBB 2.0.9, making the board non-functional for users with specific php.ini settings
- Added code to let phpBB work with PHP5 for those having register_long_arrays set to off (default settings). git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4931 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -53,25 +53,40 @@ if (@$ini_val('register_globals') == '1' || strtolower(@$ini_val('register_globa
|
||||
if (is_array(${$var_prefix . $var . $var_suffix}))
|
||||
{
|
||||
unset_vars(${$var_prefix . $var . $var_suffix});
|
||||
@reset(${$var_prefix . $var . $var_suffix});
|
||||
}
|
||||
|
||||
if (is_array(${$var}))
|
||||
{
|
||||
unset_vars(${$var});
|
||||
@reset(${$var});
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array(${'_FILES'}))
|
||||
{
|
||||
unset_vars(${'_FILES'});
|
||||
@reset(${'_FILES'});
|
||||
}
|
||||
|
||||
if (is_array(${'HTTP_POST_FILES'}))
|
||||
{
|
||||
unset_vars(${'HTTP_POST_FILES'});
|
||||
@reset(${'HTTP_POST_FILES'});
|
||||
}
|
||||
}
|
||||
|
||||
// PHP5 with register_long_arrays off?
|
||||
if (!isset($HTTP_POST_VARS) && isset($_POST))
|
||||
{
|
||||
$HTTP_POST_VARS = $_POST;
|
||||
$HTTP_GET_VARS = $_GET;
|
||||
$HTTP_SERVER_VARS = $_SERVER;
|
||||
$HTTP_COOKIE_VARS = $_COOKIE;
|
||||
$HTTP_ENV_VARS = $_ENV;
|
||||
$HTTP_POST_FILES = $_FILES;
|
||||
}
|
||||
|
||||
//
|
||||
// addslashes to vars if magic_quotes_gpc is off
|
||||
// this is a security precaution to prevent someone
|
||||
|
Reference in New Issue
Block a user