diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 7f57d234c1..ce28ff7a9a 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -5176,6 +5176,10 @@ function wp_list_filter( $list, $args = array(), $operator = 'AND' ) { * `$list` will be preserved in the results. */ function wp_list_pluck( $list, $field, $index_key = null ) { + if ( ! is_array( $list ) ) { + return array(); + } + $util = new WP_List_Util( $list ); return $util->pluck( $field, $index_key );