mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Coding Standards: no camelcase variables, use lowercase for variables. Props hakre. Fixes #12519
git-svn-id: http://svn.automattic.com/wordpress/trunk@13598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2ecc414b32
commit
4917e5b375
@ -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] );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user