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
This commit is contained in:
parent
84f9592f88
commit
163d59f8e1
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue