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.
Built from https://develop.svn.wordpress.org/trunk@29941


git-svn-id: http://core.svn.wordpress.org/trunk@29692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2014-10-17 20:25:19 +00:00
parent 9345e9ffa5
commit 4ca2996eff
1 changed files with 3 additions and 0 deletions

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