From 48a0f157b158b04924f0eb7e9e3a4cf53534a15e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 22 Dec 2010 17:40:51 +0000 Subject: [PATCH] Don't assume queried object is a term. Fixes non-existent var notice. Props filosofo. fixes #15944 git-svn-id: https://develop.svn.wordpress.org/trunk@17109 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/nav-menu-template.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index 2b24b74848..23657f7c30 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -426,7 +426,10 @@ function _wp_menu_item_classes_by_context( &$menu_items ) { 'taxonomy' == $parent_item->type && isset( $possible_taxonomy_ancestors[ $parent_item->object ] ) && in_array( $parent_item->object_id, $possible_taxonomy_ancestors[ $parent_item->object ] ) && - $parent_item->object_id != $queried_object->term_id + ( + ! isset( $queried_object->term_id ) || + $parent_item->object_id != $queried_object->term_id + ) ) ) ) {