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:
parent
794e39317a
commit
90de63b3ad
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue