From 63e3c4430e0e82f81f2eb95bb6bf8266dd67e53c Mon Sep 17 00:00:00 2001 From: scribu Date: Mon, 13 Dec 2010 15:15:58 +0000 Subject: [PATCH] Always set groupby when a tax query is involved. See #15752 git-svn-id: https://develop.svn.wordpress.org/trunk@16894 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index c83fd8fa32..0cd192ef02 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1980,7 +1980,7 @@ class WP_Query { } } - if ( $this->is_category || $this->is_tag || $this->is_tax || !empty( $q['meta_key'] ) ) { + if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_key'] ) ) { $groupby = "{$wpdb->posts}.ID"; }