Backport from 1.6

git-svn-id: http://svn.automattic.com/wordpress/branches/1.5@2771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-08-09 20:14:58 +00:00
parent 38dc5dd279
commit d707353a40
1 changed files with 11 additions and 0 deletions

View File

@ -13,6 +13,17 @@ if (! isset($_SERVER['REQUEST_URI'])) {
}
}
// Turn register globals off
if ( ini_get('register_globals') ) {
$superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
if ( isset($_SESSION) )
array_unshift($superglobals, $_SESSION);
foreach ( $superglobals as $superglobal )
foreach ( $superglobal as $global => $value )
unset( $GLOBALS[$global] );
}
if ( !(phpversion() >= '4.1') )
die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );