From ce9b9a9e78ad315a744d2f3078746308d8ce110b Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 9 Dec 2010 19:42:25 +0000 Subject: [PATCH] Always have a WP_Tax_Query instance, to prevent notices. See #15752 git-svn-id: http://svn.automattic.com/wordpress/trunk@16851 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 9fac164cb..725a30648 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1936,9 +1936,9 @@ class WP_Query { $search = apply_filters_ref_array('posts_search', array( $search, &$this ) ); // Taxonomies - if ( $this->is_category || $this->is_tag || $this->is_tax ) { - $this->tax_query = $this->parse_tax_query( $q ); + $this->tax_query = $this->parse_tax_query( $q ); + if ( $this->is_category || $this->is_tag || $this->is_tax ) { $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' ); $join .= $clauses['join'];