Force GROUP BY when there's a tax query. See #12891

git-svn-id: https://develop.svn.wordpress.org/trunk@16482 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-11-19 09:17:59 +00:00
parent 794e39317a
commit 90de63b3ad
1 changed files with 1 additions and 1 deletions

View File

@ -1984,7 +1984,7 @@ class WP_Query {
}
}
if ( !empty($q['meta_key']) ) {
if ( !empty( $this->tax_query ) || !empty( $q['meta_key'] ) ) {
$groupby = "{$wpdb->posts}.ID";
}