git-svn-id: file:///svn/phpbb/trunk@5860 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-04-29 13:31:32 +00:00
parent 859902ea24
commit b011b84060

View file

@ -23,23 +23,14 @@ if (!defined('IN_PHPBB'))
$starttime = explode(' ', microtime()); $starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0]; $starttime = $starttime[1] + $starttime[0];
error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables error_reporting(E_ERROR | E_WARNING | E_PARSE);
//error_reporting(E_ALL);
// If we are on PHP >= 6.0.0 we do not need some code /*
if (version_compare(phpversion(), '6.0.0-dev', '>=')) * Remove variables created by register_globals from the global scope
* Thanks to Matt Kavanagh
*/
function deregister_globals()
{ {
define('STRIP', false);
}
else
{
set_magic_quotes_runtime(0);
// Be paranoid with passed vars
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
// Remove variables created by register_globals from the global scope
// Thanks to Matt Kavanagh
$not_unset = array( $not_unset = array(
'GLOBALS' => true, 'GLOBALS' => true,
'_GET' => true, '_GET' => true,
@ -86,6 +77,21 @@ else
} }
unset($input); unset($input);
}
// If we are on PHP >= 6.0.0 we do not need some code
if (version_compare(phpversion(), '6.0.0-dev', '>='))
{
define('STRIP', false);
}
else
{
set_magic_quotes_runtime(0);
// Be paranoid with passed vars
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
deregister_globals();
} }
define('STRIP', (get_magic_quotes_gpc()) ? true : false); define('STRIP', (get_magic_quotes_gpc()) ? true : false);