From ffb54b11c243e37dcb88361d7359378357d86bd2 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: http://svn.automattic.com/wordpress/trunk@16853 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 725a30648..20f4b529c 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'] )