[wp-trac] [WordPress Trac] #31316: wp_list_pluck unexpectedly returns id indexed array instead of plucked values with index_key = null

WordPress Trac noreply at wordpress.org
Fri Feb 13 02:01:58 UTC 2015


#31316: wp_list_pluck unexpectedly returns id indexed array instead of plucked
values with index_key = null
------------------------------------+------------------------------
 Reporter:  adamsilverstein         |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by adamsilverstein):

 re: "plugins (or core) expecting this behaviour." - I'm not sure why they
 would expect this bahaviour, its completely unexpected - thats not what
 the function doc block states the function is going to return.

 [[Image(http://monosnap.com/image/rIFOSZbh09AM1drumlEbBJyEc0WBq3.png)]]





 Replying to [comment:3 dd32]:
 > It's worth mentioning here, that altering `wp_list_pluck()` could be out
 of the question based on plugins (or core) expecting this behaviour.
 >
 > It might be better to raise this as a bug in `get_the_terms()` if the
 return values changed.

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


More information about the wp-trac mailing list