From 4c544151b2f488ea189266ece0dc440cded57186 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 17 Oct 2014 20:24:57 +0000 Subject: [PATCH] Bail from cleaning meta query clause when it's not an array. Later isset() checks on string values were causing notices on PHP < 5.4. Props jorbin. See #29642. git-svn-id: https://develop.svn.wordpress.org/trunk@29941 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/meta.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php index 9779391024..767e09e625 100644 --- a/src/wp-includes/meta.php +++ b/src/wp-includes/meta.php @@ -985,6 +985,9 @@ class WP_Meta_Query { if ( 'relation' === $key ) { $relation = $query; + } else if ( ! is_array( $query ) ) { + continue; + // First-order clause. } else if ( $this->is_first_order_clause( $query ) ) { if ( isset( $query['value'] ) && array() === $query['value'] ) {