diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 63b505417f..dcf1b56b37 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1041,7 +1041,7 @@ class WP_Tax_Query { } elseif ( 'NOT IN' == $operator ) { if ( empty( $terms ) ) { - continue; + return $sql; } $terms = implode( ',', $terms ); @@ -1055,7 +1055,7 @@ class WP_Tax_Query { } elseif ( 'AND' == $operator ) { if ( empty( $terms ) ) { - continue; + return $sql; } $num_terms = count( $terms );