From 577d223715474bdd8467078cd7bf61f7f6fb8a40 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 4 Jun 2014 18:20:59 +0000 Subject: [PATCH] Wrap individual meta query `WHERE` clases in parens, missed in `28659`. Props boonebgorges. Fixes #25538. git-svn-id: https://develop.svn.wordpress.org/trunk@28665 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php index cb83e4600e..965b863fa5 100644 --- a/src/wp-includes/meta.php +++ b/src/wp-includes/meta.php @@ -1068,7 +1068,7 @@ class WP_Meta_Query { $where = ' AND (' . implode( "\n{$this->relation} ", $where ) . ' )'; if ( ! empty( $where_meta_key ) ) { - $where .= "\nAND " . implode( "\nAND ", $where_meta_key ); + $where .= "\nAND (" . implode( "\nAND ", $where_meta_key ) . ' )'; } $join = implode( "\n", $join );