mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Fix logic for when excluding a non-existant term. See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@16512 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1947,12 +1947,8 @@ class WP_Query {
|
||||
if ( !empty( $this->tax_query ) ) {
|
||||
$clauses = call_user_func_array( 'get_tax_sql', array( $this->tax_query, $wpdb->posts, 'ID', &$this) );
|
||||
|
||||
if ( empty($clauses['join']) && empty($clauses['where']) ) {
|
||||
$where .= ' AND 0 = 1';
|
||||
} else {
|
||||
$join .= $clauses['join'];
|
||||
$where .= $clauses['where'];
|
||||
}
|
||||
$join .= $clauses['join'];
|
||||
$where .= $clauses['where'];
|
||||
|
||||
if ( $this->is_tax ) {
|
||||
if ( empty($post_type) ) {
|
||||
|
||||
Reference in New Issue
Block a user