Better wp_reset_vars() behavior when var is already set. props scribu. fixes #11974
git-svn-id: https://develop.svn.wordpress.org/trunk@12831 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
795bbaaf79
commit
5aae2baff3
@ -245,15 +245,13 @@ function wp_reset_vars( $vars ) {
|
||||
$var = $vars[$i];
|
||||
global $$var;
|
||||
|
||||
if (!isset( $$var ) ) {
|
||||
if ( empty( $_POST[$var] ) ) {
|
||||
if ( empty( $_GET[$var] ) )
|
||||
$$var = '';
|
||||
else
|
||||
$$var = $_GET[$var];
|
||||
} else {
|
||||
$$var = $_POST[$var];
|
||||
}
|
||||
if ( empty( $_POST[$var] ) ) {
|
||||
if ( empty( $_GET[$var] ) )
|
||||
$$var = '';
|
||||
else
|
||||
$$var = $_GET[$var];
|
||||
} else {
|
||||
$$var = $_POST[$var];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user