[wp-trac] [WordPress Trac] #63440: 6.8.1 Multisite: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, string given in wp-includes/class-wp-roles.php:291

WordPress Trac noreply at wordpress.org
Thu May 15 10:14:09 UTC 2025


#63440: 6.8.1 Multisite: Uncaught TypeError: array_keys(): Argument #1 ($array)
must be of type array, string given in wp-includes/class-wp-roles.php:291
-------------------------------+----------------------------------------
 Reporter:  thejasonator       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Role/Capability    |     Version:
 Severity:  major              |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  administration, multisite
-------------------------------+----------------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => reporter-feedback


Comment:

 Hi there welcome to WordPress Trac!

 The error message refers to the `WP_Roles::$roles` property, which should
 only ever be an array, but it appears to be changed to a string for some
 reason, most likely by a plugin or theme.

 Does the issue still happens with all plugins disabled and a default theme
 (Twenty Twenty-Five) activated?

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


More information about the wp-trac mailing list