Better wp_reset_vars() behavior when var is already set. props scribu. fixes #11974
git-svn-id: http://svn.automattic.com/wordpress/trunk@12831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6690680e9c
commit
927472de19
|
@ -245,7 +245,6 @@ function wp_reset_vars( $vars ) {
|
||||||
$var = $vars[$i];
|
$var = $vars[$i];
|
||||||
global $$var;
|
global $$var;
|
||||||
|
|
||||||
if (!isset( $$var ) ) {
|
|
||||||
if ( empty( $_POST[$var] ) ) {
|
if ( empty( $_POST[$var] ) ) {
|
||||||
if ( empty( $_GET[$var] ) )
|
if ( empty( $_GET[$var] ) )
|
||||||
$$var = '';
|
$$var = '';
|
||||||
|
@ -255,7 +254,6 @@ function wp_reset_vars( $vars ) {
|
||||||
$$var = $_POST[$var];
|
$$var = $_POST[$var];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue