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

WordPress Trac noreply at wordpress.org
Mon May 9 23:05:51 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 dev-reviewed   |
  fixed-major                                    |
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 Replying to [comment:46 SergeyBiryukov]:
 > I would prefer if the expected results in the tests matched the actual
 results a bit more closely, specifically in returning the uppercase `ID`
 before `id`.

 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. Whe it does, `assertSame` is used.

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


More information about the wp-trac mailing list