mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Check $_current_page
before using it in Walker_Page->start_el()
.
Props jeremyfelt. Fixes #26901. Built from https://develop.svn.wordpress.org/trunk@30157 git-svn-id: http://core.svn.wordpress.org/trunk@30157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
60b73c589c
commit
849a993269
@ -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 ) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-alpha-30156';
|
||||
$wp_version = '4.1-alpha-30157';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user