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:
parent
339b9f015d
commit
5e9d071992
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user