From 38819880ec1d73bd70cfd9ed86def55e89fffef2 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 4 Jun 2014 18:21:15 +0000 Subject: [PATCH] Wrap individual meta query `WHERE` clases in parens, missed in `28659`. Props boonebgorges. Fixes #25538. Built from https://develop.svn.wordpress.org/trunk@28665 git-svn-id: http://core.svn.wordpress.org/trunk@28483 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/meta.php b/wp-includes/meta.php index cb83e4600e..965b863fa5 100644 --- a/wp-includes/meta.php +++ b/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 );