Avoid a PHP notice when trying to access the `post_parent` property of hierarchical post type nav menu items.

Merges [35876] to the 4.4 branch.

Fixes #34446

Built from https://develop.svn.wordpress.org/branches/4.4@36044


git-svn-id: http://core.svn.wordpress.org/branches/4.4@36009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2015-12-21 03:53:25 +00:00
parent ce18aadc7b
commit b7fdda8edb
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4.1-alpha-36043';
$wp_version = '4.4.1-alpha-36044';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.