Make sure the array exists before adding an element to it. props rodrigosprimo. fixes #23272.

git-svn-id: http://core.svn.wordpress.org/trunk@23346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-01-25 12:24:10 +00:00
parent 411acbdf43
commit a7f7fcdb18
1 changed files with 1 additions and 1 deletions

View File

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