From 927472de1974c3d8803a786daa9acb149946217b Mon Sep 17 00:00:00 2001 From: markjaquith Date: Tue, 26 Jan 2010 06:06:14 +0000 Subject: [PATCH] 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 --- wp-admin/includes/misc.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index b223c224ae..d06a31b382 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -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]; } } }