From 3870e8f25c83630c2374e99ad2f0b4ab4e6feae4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 25 Jan 2013 12:24:10 +0000 Subject: [PATCH] Make sure the array exists before adding an element to it. props rodrigosprimo. fixes #23272. git-svn-id: https://develop.svn.wordpress.org/trunk@23346 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-walker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-wp-walker.php b/wp-includes/class-wp-walker.php index df9d9b61f0..403bad2dc7 100644 --- a/wp-includes/class-wp-walker.php +++ b/wp-includes/class-wp-walker.php @@ -123,7 +123,7 @@ class Walker { $id_field = $this->db_fields['id']; //display this element - if ( is_array( $args[0] ) ) + if ( isset( $args[0] ) && is_array( $args[0] ) ) $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] ); $cb_args = array_merge( array(&$output, $element, $depth), $args); call_user_func_array(array($this, 'start_el'), $cb_args);