From 3949a8b6cc50a021ed93798287b4ef9ea8a560d9 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 16 Oct 2014 22:07:20 +0000 Subject: [PATCH] Remove invalid `continue` calls from WP_Tax_Query::get_sql_for_clause(). This was leftover code from the previous implementation, which used a `foreach()` loop. See [29901]. Props nofearinc. See #29738, #29718. Built from https://develop.svn.wordpress.org/trunk@29931 git-svn-id: http://core.svn.wordpress.org/trunk@29683 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 );