Make WordPress Core

Changeset 2770 for trunk/wp-settings.php


Ignore:
Timestamp:
08/09/2005 08:09:20 PM (19 years ago)
Author:
matt
Message:

That last thing didn't work at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r2769 r2770  
    44$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
    55
    6 // Turn register globals off - Christian Schmidt
    7 if ( ini_get('register_globals') )
    8     foreach ( array_merge($_REQUEST, $_SERVER, $_ENV) as $name => $value )
    9         unset($name, $value);
     6// Turn register globals off
     7if ( ini_get('register_globals') ) {
     8   $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
     9   if ( isset($_SESSION) )
     10        array_unshift($superglobals, $_SESSION);
     11
     12   foreach ( $superglobals as $superglobal )
     13       foreach ( $superglobal as $global => $value )
     14           unset( $GLOBALS[$global] );
     15}
    1016
    1117// Fix for IIS, which doesn't set REQUEST_URI
Note: See TracChangeset for help on using the changeset viewer.