[wp-trac] [WordPress Trac] #43025: wp_list_filter should filter all iterable objects

WordPress Trac noreply at wordpress.org
Thu Jan 4 23:09:40 UTC 2018


#43025: wp_list_filter should filter all iterable objects
--------------------------+-----------------------------
 Reporter:  jarednova     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 #16499 introduced an issue which requires that data sent to
 `wp_list_filter` is an array. What it really means is the data sent to
 `wp_list_filter` should be iterable _like_ an array. By permitting both
 arrays and objects that are Transverable we can allow for anything that
 decends from the `\ArrayObject` class.

 While there is an `is_iterable` method we _could_ use, it's only
 availabile in PHP 7.1 so the attached is friendly to PHP v4.2 and above

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43025>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list