[wp-trac] [WordPress Trac] #49641: Clarify what happens when meta_value is `''` in get_users like functions.

WordPress Trac noreply at wordpress.org
Fri Aug 19 11:30:13 UTC 2022


#49641: Clarify what happens when meta_value is `''` in get_users like functions.
-------------------------+-------------------------------------
 Reporter:  growthwp     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Users        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-docs   |     Focuses:  docs, coding-standards
-------------------------+-------------------------------------

Comment (by danomurray):

 Just noting that we could have been caught out by this if we hadn't found
 this ticket, and have been caught out by a similar issue with get_users()
 when passing an empty array of include IDs

 $users = get_users(array('include' => $user_ids,));

 If we hadn't caught this in testing it would have caused a nasty bug where
 all users were emailed instead of a very restricted set.

 Would be great to see these issues documented or addressed.

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


More information about the wp-trac mailing list