Fix notice in get_queried_object(). See #15752

git-svn-id: http://svn.automattic.com/wordpress/trunk@16853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-12-10 07:51:04 +00:00
parent 4b48cc1624
commit ffb54b11c2
1 changed files with 3 additions and 2 deletions

View File

@ -2654,8 +2654,9 @@ class WP_Query {
$this->queried_object = NULL; $this->queried_object = NULL;
$this->queried_object_id = 0; $this->queried_object_id = 0;
$tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) ); if ( $this->is_category || $this->is_tag || $this->is_tax ) {
if ( !empty( $tax_query_in ) ) { $tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) );
$query = reset( $tax_query_in ); $query = reset( $tax_query_in );
if ( 'term_id' == $query['field'] ) if ( 'term_id' == $query['field'] )