[wp-trac] [WordPress Trac] #35087: Make sure $list in wp_list_pluck() is an array
WordPress Trac
noreply at wordpress.org
Tue Dec 15 03:37:04 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 dd32):
> Ideally code making use of wp_list_pluck() would make sure the
parameters are the correct type first.
For the record, I personally disagree with this proposal for that reason
alone.
> Since that isn't happening it is time for wp_list_pluck() to take a more
defensive stance.
I think this just shows that allowing that warning to filter through is
the right thing to do, instead of hiding it from developers, we should be
letting them see it and act accordingly. It's annoying when you're working
with someone else's code which isn't behaving, but at least you now know
why the functionality you're looking at is potentially broken.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35087#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list