[wp-trac] [WordPress Trac] #35087: Make sure $list in wp_list_pluck() is an array
WordPress Trac
noreply at wordpress.org
Tue Dec 15 06:03:47 UTC 2015
#35087: Make sure $list in wp_list_pluck() is an array
--------------------------+------------------------------
Reporter: josephscott | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by nacin):
I strongly agree with @dd32 here.
The most that we'd do is check the type then want to issue a warning,
rather than paper over the code. This is something we rarely do, and at
that point, we might as well just keep the warning we have.
(FWIW: This sounds like a good opportunity for a unit test to assert that
a non-array *does* throw a warning.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35087#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list