WordPress.org

Make WordPress Core

Changeset 17109


Ignore:
Timestamp:
12/22/2010 05:40:51 PM (8 years ago)
Author:
ryan
Message:

Don't assume queried object is a term. Fixes non-existent var notice. Props filosofo. fixes #15944

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu-template.php

    r16912 r17109  
    427427                    isset( $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
    428428                    in_array( $parent_item->object_id, $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
    429                     $parent_item->object_id != $queried_object->term_id
     429                    (   
     430                        ! isset( $queried_object->term_id ) ||
     431                        $parent_item->object_id != $queried_object->term_id
     432                    )
    430433                )
    431434            )
Note: See TracChangeset for help on using the changeset viewer.