From 36679a6e89ab14b6ddcd1c1153e57c0b70986831 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 12 Dec 2015 01:06:29 +0000 Subject: [PATCH] Avoid a PHP notice when trying to access the `post_parent` property of hierarchical post type nav menu items. FIxes #34446 Built from https://develop.svn.wordpress.org/trunk@35876 git-svn-id: http://core.svn.wordpress.org/trunk@35840 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-walker.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-walker.php b/wp-includes/class-wp-walker.php index e4890ae5c6..ee68a205e9 100644 --- a/wp-includes/class-wp-walker.php +++ b/wp-includes/class-wp-walker.php @@ -215,7 +215,7 @@ class Walker { $top_level_elements = array(); $children_elements = array(); foreach ( $elements as $e) { - if ( 0 == $e->$parent_field ) + if ( empty( $e->$parent_field ) ) $top_level_elements[] = $e; else $children_elements[ $e->$parent_field ][] = $e; diff --git a/wp-includes/version.php b/wp-includes/version.php index 976870b312..4879fd017d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-35875'; +$wp_version = '4.5-alpha-35876'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.