diff --git a/wp-includes/class-wp-meta-query.php b/wp-includes/class-wp-meta-query.php index fbe49f3814..e1fd812e56 100644 --- a/wp-includes/class-wp-meta-query.php +++ b/wp-includes/class-wp-meta-query.php @@ -548,8 +548,8 @@ class WP_Meta_Query { $meta_type = $this->get_cast_for_type( $_meta_type ); $clause['cast'] = $meta_type; - // Fallback for clause keys is the table alias. - if ( ! $clause_key ) { + // Fallback for clause keys is the table alias. Key must be a string. + if ( is_int( $clause_key ) || ! $clause_key ) { $clause_key = $clause['alias']; } diff --git a/wp-includes/query.php b/wp-includes/query.php index 5b36393ac7..5648166e1b 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2280,7 +2280,7 @@ class WP_Query { $allowed_keys = array_merge( $allowed_keys, array_keys( $meta_clauses ) ); } - if ( ! in_array( $orderby, $allowed_keys ) ) { + if ( ! in_array( $orderby, $allowed_keys, true ) ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0e069baf72..5632d62f23 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34089'; +$wp_version = '4.4-alpha-34090'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.