mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 09:03:09 +01:00
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:
parent
bdf71f89ad
commit
03b49d8f88
@ -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 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user