mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
thanks pit
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5093 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
585dff72c6
commit
31cf453ed2
1 changed files with 2 additions and 3 deletions
|
@ -50,11 +50,10 @@ if (!isset($HTTP_POST_VARS) && isset($_POST))
|
||||||
if (@phpversion() < '4.0.0')
|
if (@phpversion() < '4.0.0')
|
||||||
{
|
{
|
||||||
// PHP3 path; in PHP3, globals are _always_ registered
|
// PHP3 path; in PHP3, globals are _always_ registered
|
||||||
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');
|
|
||||||
|
|
||||||
// We 'flip' the array of variables to test like this so that
|
// We 'flip' the array of variables to test like this so that
|
||||||
// we can validate later with isset($test[$var]) (no in_array())
|
// we can validate later with isset($test[$var]) (no in_array())
|
||||||
$test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL);
|
$test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL);
|
||||||
|
|
||||||
// Loop through each input array
|
// Loop through each input array
|
||||||
@reset($test);
|
@reset($test);
|
||||||
|
@ -63,7 +62,7 @@ if (@phpversion() < '4.0.0')
|
||||||
while (list($var,) = @each($$input))
|
while (list($var,) = @each($$input))
|
||||||
{
|
{
|
||||||
// Validate the variable to be unset
|
// Validate the variable to be unset
|
||||||
if (!isset($test[$var]) && $var != 'test' && $var != 'input' && $var != 'not_unset' && !in_array($var, $not_unset))
|
if (!isset($test[$var]) && $var != 'test' && $var != 'input' && $var != 'not_unset')
|
||||||
{
|
{
|
||||||
unset($$var);
|
unset($$var);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue