diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php index e4890ae5c6..ee68a205e9 100644 --- a/src/wp-includes/class-wp-walker.php +++ b/src/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;