From 09f625b796529901ff4e7e2a6f97b6f95e43d7ec Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@17109 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 2b24b7484..23657f7c3 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 + ) ) ) ) {