[wp-trac] [WordPress Trac] #53177: WP_User_Query does not accept fields as string except ID

WordPress Trac noreply at wordpress.org
Fri May 6 04:57:27 UTC 2022


#53177: WP_User_Query does not accept fields as string except ID
-------------------------------------------------+-------------------------
 Reporter:  rilwis                               |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.0
Component:  Users                                |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-testing-info has-dev-note has-   |     Focuses:  docs
  patch has-unit-tests needs-docs                |
-------------------------------------------------+-------------------------

Comment (by dd32):

 Replying to [comment:39 peterwilsoncc]:
 > dd32 could you please check it fixes your bug

 Yes, this appears to fix the BuddyPress bug
 https://buddypress.trac.wordpress.org/ticket/8694

 I have not tested it other than that, but the code appears good and the
 unit test coverage wide.

 > both ID and id are returned when fields is an array containing ID

 I agree that this seemed to be the best BC way here - it seems unlikely
 (and wrong) for anyone to have been expecting a lower-case `id` but given
 how easy it is to support, and the case insensitivity of the database,
 this seemed like an easy win to avoid potential breakage.

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


More information about the wp-trac mailing list