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
This commit is contained in:
Boone Gorges 2014-10-17 20:24:57 +00:00
parent 1708a580fd
commit 4c544151b2

View File

@ -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'] ) {