Make WordPress Core

Changeset 36044 for branches/4.4


Ignore:
Timestamp:
12/21/2015 03:52:54 AM (11 years ago)
Author:
johnbillion
Message:

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

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-includes/class-wp-walker.php

    r34121 r36044  
    216216                $children_elements  = array();
    217217                foreach ( $elements as $e) {
    218                         if ( 0 == $e->$parent_field )
     218                        if ( empty( $e->$parent_field ) )
    219219                                $top_level_elements[] = $e;
    220220                        else
Note: See TracChangeset for help on using the changeset viewer.