From 849a993269b7c055764966d621f0f1189768ddfe Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 1 Nov 2014 20:29:22 +0000 Subject: [PATCH] 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 --- wp-includes/post-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 2f84b72774..27fe5611ca 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 7cde277d51..2aa56b53a0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.