WordPress.org

Make WordPress Core

Changeset 35876


Ignore:
Timestamp:
12/12/2015 01:05:27 AM (5 years ago)
Author:
johnbillion
Message:

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

FIxes #34446

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-walker.php

    r34121 r35876  
    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.