Make WordPress Core


Ignore:
Timestamp:
02/09/2011 05:06:22 PM (14 years ago)
Author:
ryan
Message:

Return early if list is not an array. Props nacin. fixes #16499 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r17251 r17427  
    30353035 */
    30363036function wp_filter_object_list( $list, $args = array(), $operator = 'and', $field = false ) {
     3037    if ( ! is_array( $list ) )
     3038        return array();
     3039
    30373040    $list = wp_list_filter( $list, $args, $operator );
    30383041
     
    30583061 */
    30593062function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
     3063    if ( ! is_array( $list ) )
     3064        return array();
     3065
    30603066    if ( empty( $args ) )
    30613067        return $list;
Note: See TracChangeset for help on using the changeset viewer.