From ea0d5bf16610145e195e45ab8cda0a40068bf291 Mon Sep 17 00:00:00 2001 From: scribu Date: Fri, 10 Dec 2010 07:51:04 +0000 Subject: [PATCH] Fix notice in get_queried_object(). See #15752 git-svn-id: https://develop.svn.wordpress.org/trunk@16853 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 725a306482..20f4b529c1 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2654,8 +2654,9 @@ class WP_Query { $this->queried_object = NULL; $this->queried_object_id = 0; - $tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) ); - if ( !empty( $tax_query_in ) ) { + if ( $this->is_category || $this->is_tag || $this->is_tax ) { + $tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) ); + $query = reset( $tax_query_in ); if ( 'term_id' == $query['field'] )