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

WordPress Trac noreply at wordpress.org
Tue May 10 07:48:54 UTC 2022


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

Comment (by SergeyBiryukov):

 Replying to [comment:48 peterwilsoncc]:
 > I don't think it matters. As WPDB returns the results as a `stdClass()`
 the tests already need to cast them to an array to be able to do the
 tests. `assertSameSetsWithIndex()` exists precicly because order doesn't
 matter.

 Yeah, it doesn't matter for the tests to pass, but having some consistency
 here makes it easier for me to build a mental map of how it works and what
 is expected. Thanks for the commit!

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


More information about the wp-trac mailing list