WordPress.org

Make WordPress Core

Changeset 23346


Ignore:
Timestamp:
01/25/13 12:24:10 (2 years ago)
Author:
SergeyBiryukov
Message:

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

File:
1 edited

Legend:

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

    r22118 r23346  
    124124 
    125125        //display this element 
    126         if ( is_array( $args[0] ) ) 
     126        if ( isset( $args[0] ) && is_array( $args[0] ) ) 
    127127            $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] ); 
    128128        $cb_args = array_merge( array(&$output, $element, $depth), $args); 
Note: See TracChangeset for help on using the changeset viewer.