Check `$_current_page` before using it in `Walker_Page->start_el()`.

Props jeremyfelt.
Fixes #26901.


git-svn-id: https://develop.svn.wordpress.org/trunk@30157 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-11-01 20:28:40 +00:00
parent bdf71f89ad
commit 03b49d8f88
1 changed files with 1 additions and 1 deletions

View File

@ -1305,7 +1305,7 @@ class Walker_Page extends Walker {
if ( ! empty( $current_page ) ) {
$_current_page = get_post( $current_page );
if ( in_array( $page->ID, $_current_page->ancestors ) ) {
if ( $_current_page && in_array( $page->ID, $_current_page->ancestors ) ) {
$css_class[] = 'current_page_ancestor';
}
if ( $page->ID == $current_page ) {