[wp-trac] [WordPress Trac] #60931: The 'get_users' function triggers a fatal error if a role is added without any capability assigned.

WordPress Trac noreply at wordpress.org
Fri Apr 5 18:16:09 UTC 2024


#60931: The 'get_users' function triggers a fatal error if a role is added without
any capability assigned.
--------------------------+------------------------------
 Reporter:  nazsabuz      |       Owner:  nazsabuz
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  2.0
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by jorbin):

 * keywords:  has-patch => needs-patch
 * version:  6.5 => 2.0


Comment:

 If you are calling `add_role` with null `$capabilities` you are doing it
 wrong and I don't think this is something that should be hidden. I think
 causing add_role to fail in this situation is a better solution.

 Changing the milestone to 2.0 since that is when `add_role` was added.

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


More information about the wp-trac mailing list