Always set groupby when a tax query is involved. See #15752

git-svn-id: http://svn.automattic.com/wordpress/trunk@16894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-12-13 15:15:58 +00:00
parent 0aaef4b1ad
commit 6114b7403c
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";
}