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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-11-19 09:17:59 +00:00
parent 1baed284ed
commit 7879bcaee5
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";
}