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
This commit is contained in:
scribu 2010-12-13 15:15:58 +00:00
parent cbe9f7f3a0
commit 63e3c4430e
1 changed files with 1 additions and 1 deletions

View File

@ -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";
}