WordPress.org

Make WordPress Core

Changeset 17428


Ignore:
Timestamp:
02/09/2011 05:07:12 PM (7 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/functions.php

    r17251 r17428  
    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.