[wp-trac] [WordPress Trac] #34172: wp_list_pluck missing checks

WordPress Trac noreply at wordpress.org
Tue Oct 6 19:25:52 UTC 2015


#34172: wp_list_pluck missing checks
--------------------------+------------------------------
 Reporter:  wpsmith       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+------------------------------

Comment (by wpsmith):

 Replying to [comment:3 boonebgorges]:
 > To put the same point another way, your patch assumes that
 `wp_list_pluck()` should simply skip items that don't have the specified
 property. But why should this be expected behavior? Why wouldn't you want
 `array( null, null )` returned?

 That is a good point and something that should be considered. As for a
 good use case, see #34175.

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


More information about the wp-trac mailing list