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.