[wp-trac] [WordPress Trac] #56650: Add more error checking to WP_List_Util::pluck
WordPress Trac
noreply at wordpress.org
Wed Sep 28 19:39:32 UTC 2022
#56650: Add more error checking to WP_List_Util::pluck
--------------------------+------------------------------
Reporter: afragen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Description changed by afragen:
Old description:
> `$field` is checked to see if it is an object, but the `else` doesn't
> check to see if `$field` is an array.
>
> I've found instances where `null` is passed to `WP_List_Util::pluck(
> $field = null )` resulting in an error. Some additional error checking in
> the `else` should solve this.
New description:
`$value` is checked to see if it is an object, but the `else` doesn't
check to see if `$value` is an array.
I've found instances where `null` is passed to `WP_List_Util::pluck()`
resulting in an error. Some additional error checking in the `else` should
solve this.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56650#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list