From 163d59f8e1777947d0576a4069c1f72569aa935e Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 9 Sep 2016 19:37:38 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-query.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index 95904060ce..fd7dfe08db 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -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 { diff --git a/wp-includes/version.php b/wp-includes/version.php index d5c1bd3620..416806f577 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.