Commit 163d59f8 authored by Boone Gorges's avatar Boone Gorges

Query: Avoid PHP notice in `get_queried_object()` when query contains `NOT EXISTS` tax query.

Props johnjamesjacoby.
See #37962.
Built from https://develop.svn.wordpress.org/trunk@38585


git-svn-id: http://core.svn.wordpress.org/trunk@38528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 84f9592f
......@@ -3264,7 +3264,7 @@ class WP_Query {
$matched_taxonomy = reset( $queried_taxonomies );
$query = $tax_query_in_and[ $matched_taxonomy ];
if ( $query['terms'] ) {
if ( ! empty( $query['terms'] ) ) {
if ( 'term_id' == $query['field'] ) {
$term = get_term( reset( $query['terms'] ), $matched_taxonomy );
} else {
......
......@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38584';
$wp_version = '4.7-alpha-38585';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment