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:
markjaquith 2010-01-26 06:06:14 +00:00
parent 6690680e9c
commit 927472de19
1 changed files with 7 additions and 9 deletions

View File

@ -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];
} }
} }
}
} }
/** /**