From 25593e291c26354c6ffdb462b5537b52d3d51c45 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 29 May 2014 17:52:25 +0000 Subject: [PATCH] When queries are passed to `WP_Tax_Query`, the value for `operator` is assumed to be uppercase. This is an unnecessary constraint. In `->get_sql()`, cast it using `$operator = strtoupper( $query['operator'] )`. Props clifgriffin. Fixes #27557. git-svn-id: https://develop.svn.wordpress.org/trunk@28618 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index b11ab45acb..010d33f8c8 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -743,7 +743,7 @@ class WP_Tax_Query { } $terms = $query['terms']; - $operator = $query['operator']; + $operator = strtoupper( $query['operator'] ); if ( 'IN' == $operator ) { @@ -3993,4 +3993,4 @@ function wp_check_term_hierarchy_for_loops( $parent, $term_id, $taxonomy ) { wp_update_term( $loop_member, $taxonomy, array( 'parent' => 0 ) ); return $parent; -} \ No newline at end of file +}