diff --git a/wp-settings.php b/wp-settings.php index 1aa0d8450e..f450bc9943 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -1,19 +1,27 @@ $value ) - if ( 'table_prefix' != $global ) - unset( $GLOBALS[$global] ); + $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array()); + foreach ( $input as $k => $v ) + if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) + unset($GLOBALS[$k]); } +unregister_GLOBALS(); + $HTTP_HOST = getenv('HTTP_HOST'); /* domain name */ $REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */ $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */ +unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories ); // Fix for IIS, which doesn't set REQUEST_URI if (! isset($_SERVER['REQUEST_URI'])) {