[wp-trac] [WordPress Trac] #43619: Introduce new PHP cross-version compat function `is_iterable()`

WordPress Trac noreply at wordpress.org
Fri Apr 20 18:38:05 UTC 2018


#43619: Introduce new PHP cross-version compat function `is_iterable()`
--------------------------------------+---------------------
 Reporter:  jrf                       |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  4.9.6
Component:  General                   |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by desrosj):

 Thanks for pointing that out, @jrf. I updated the patch and added a test
 for an empty array in [attachment:43619.3.diff].

 Did you have a plan in mind for updating Core to use this new function?
 There are several tickets referenced above, but wondering if making a
 singular ticket (or handling that on this ticket) is better. Same for
 #43583.

 Since these produce warnings, I think these should be fixed in 4.9.6, if
 possible.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43619#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list