Make parse_reques() set empty variables. Props filosofo for initial patch. Fixes #10710
git-svn-id: http://svn.automattic.com/wordpress/trunk@15770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
302259ee13
commit
47b8974ca6
|
@ -260,17 +260,16 @@ class WP {
|
||||||
if ( $t->query_var )
|
if ( $t->query_var )
|
||||||
$post_type_query_vars[$t->query_var] = $post_type;
|
$post_type_query_vars[$t->query_var] = $post_type;
|
||||||
|
|
||||||
for ( $i = 0; $i < count($this->public_query_vars); $i += 1 ) {
|
foreach ( $this->public_query_vars as $wpvar ) {
|
||||||
$wpvar = $this->public_query_vars[$i];
|
if ( isset( $this->extra_query_vars[$wpvar] ) )
|
||||||
if ( isset($this->extra_query_vars[$wpvar]) )
|
|
||||||
$this->query_vars[$wpvar] = $this->extra_query_vars[$wpvar];
|
$this->query_vars[$wpvar] = $this->extra_query_vars[$wpvar];
|
||||||
elseif ( isset($GLOBALS[$wpvar]) )
|
elseif ( isset( $GLOBALS[$wpvar] ) )
|
||||||
$this->query_vars[$wpvar] = $GLOBALS[$wpvar];
|
$this->query_vars[$wpvar] = $GLOBALS[$wpvar];
|
||||||
elseif ( !empty($_POST[$wpvar]) )
|
elseif ( isset( $_POST[$wpvar] ) )
|
||||||
$this->query_vars[$wpvar] = $_POST[$wpvar];
|
$this->query_vars[$wpvar] = $_POST[$wpvar];
|
||||||
elseif ( !empty($_GET[$wpvar]) )
|
elseif ( isset( $_GET[$wpvar] ) )
|
||||||
$this->query_vars[$wpvar] = $_GET[$wpvar];
|
$this->query_vars[$wpvar] = $_GET[$wpvar];
|
||||||
elseif ( !empty($perma_query_vars[$wpvar]) )
|
elseif ( isset( $perma_query_vars[$wpvar] ) )
|
||||||
$this->query_vars[$wpvar] = $perma_query_vars[$wpvar];
|
$this->query_vars[$wpvar] = $perma_query_vars[$wpvar];
|
||||||
|
|
||||||
if ( !empty( $this->query_vars[$wpvar] ) ) {
|
if ( !empty( $this->query_vars[$wpvar] ) ) {
|
||||||
|
|
Loading…
Reference in New Issue