Skip to content

Commit

Permalink
Coding Standards: no camelcase variables, use lowercase for variables…
Browse files Browse the repository at this point in the history
…. Props hakre. Fixes #12519

git-svn-id: https://develop.svn.wordpress.org/trunk@13598 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
dd32 committed Mar 6, 2010
1 parent ce6ac1f commit 89c0153
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wp-includes/load.php
Expand Up @@ -20,12 +20,12 @@ function wp_unregister_GLOBALS() {
die( /*WP_I18N_GLOBALS_OVERWRITE*/'GLOBALS overwrite attempt detected'/*/WP_I18N_GLOBALS_OVERWRITE*/ );

// Variables that shouldn't be unset
$noUnset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' );
$no_unset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' );

$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] ) ) {
$GLOBALS[$k] = NULL;
if ( !in_array( $k, $no_unset ) && isset( $GLOBALS[$k] ) ) {
$GLOBALS[$k] = null;
unset( $GLOBALS[$k] );
}
}
Expand Down

0 comments on commit 89c0153

Please sign in to comment.