mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Query: Avoid PHP notice in get_queried_object() when query contains NOT EXISTS tax query.
Props johnjamesjacoby. See #37962. git-svn-id: https://develop.svn.wordpress.org/trunk@38585 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user