Notice fix from Malaiac. fixes #8453

git-svn-id: https://develop.svn.wordpress.org/trunk@10013 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-02 19:05:24 +00:00
parent 339b9f015d
commit 5e9d071992
1 changed files with 1 additions and 1 deletions

View File

@ -1162,7 +1162,7 @@ class Walker_Page extends Walker {
$css_class = 'page_item page-item-'.$page->ID;
if ( !empty($current_page) ) {
$_current_page = get_page( $current_page );
if ( in_array($page->ID, (array) $_current_page->ancestors) )
if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) )
$css_class .= ' current_page_ancestor';
if ( $page->ID == $current_page )
$css_class .= ' current_page_item';