[wp-trac] [WordPress Trac] #54751: Invalid argument in class-wp-list-util.php

WordPress Trac noreply at wordpress.org
Fri Apr 1 05:11:47 UTC 2022


#54751: Invalid argument in class-wp-list-util.php
-----------------------------------------------------+---------------------
 Reporter:  marv2                                    |       Owner:  (none)
     Type:  defect (bug)                             |      Status:  new
 Priority:  normal                                   |   Milestone:  6.0
Component:  General                                  |     Version:  3.1
 Severity:  normal                                   |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-tests  |     Focuses:
-----------------------------------------------------+---------------------

Comment (by dd32):

 PR2492 is an alternative, simpler take on this.

 Simply validating the input values, before passing invalid data to
 `WP_List_Util`, and matches the other utility functions.

 The benefit to taking this direction is that existing 'invalid' uses of
 `wp_list_pluck()` won't need to do anything to gain the benefit.

 I've not included a unit test, as the above patches and #55300 cover it
 appropriately.

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


More information about the wp-trac mailing list