From 5da70bad8710587ee557ca46d643d5eec333ffe4 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: https://develop.svn.wordpress.org/trunk@16851 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 9fac164cb4..725a306482 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'];