Make WordPress Core

#63129 closed defect (bug) (duplicate)

Fatal Error when Bulk Changing User Roles to "No Role for This Site"

Reported by: soyebsalar Owned by:
Priority: normal Milestone:
Component: Users Version: 6.7.2
Severity: normal Keywords: needs-testing needs-patch
Cc: Focuses: administration

Description

https://prnt.sc/TZcKMrtCr9Y8
https://prnt.sc/Lm9sifkA2qzU
When bulk changing all users, including the admin, to "No Role for This Site," a fatal error occurs due to a call to has_cap() on a null object.

Steps to Reproduce:

Go to Dashboard → Users.

Bulk select all users, including the admin.

Select "No Role for This Site" from the Change role to… dropdown.

Click Change.

Observe the fatal error:Fatal error: Call to a member function has_cap() on null in https://www.yoursite.com/wp-admin/users.php on line 148

Attachments (2)

Users-‹-Wordpress-Core-—-WordPress.png (116.1 KB ) - added by soyebsalar 18 months ago.
WordPress-›-Error.png (96.5 KB ) - added by soyebsalar 18 months ago.

Download all attachments as: .zip

Change History (3)

#1 @jorbin
18 months ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

This issue is already being tracked in #63068.

Note: See TracTickets for help on using tickets.