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:
Scott Taylor 2014-11-01 20:29:22 +00:00
parent 60b73c589c
commit 849a993269
2 changed files with 2 additions and 2 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 ) {

View File

@ -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.