I have just installed a fresh version of WP which I have turned in to a network install (using the instructions found here).
All seemed to be going well, and I was able to add a new site successfully, however I am experiencing issues with listing/adding users.
When I click on the Users
menu item the list table gives the following warning –
Warning: array_keys() expects parameter 1 to be array, boolean given in {my-dir}\wp-admin\includes\class-wp-users-list-table.php on line 307
This line is – $editable_roles = array_keys( get_editable_roles() );
– the issue is that get_editable_roles()
is ruturning false
.
The same problem also occurs when I try to add a user, although the warning is at a different location –
Warning: array_reverse() expects parameter 1 to be array, boolean given in {my-dir}\wp-admin\includes\template.php on line 843
I’ve tried the obvious, deactivating all plugins (I’d added one) and switching to the default theme, but the warnings still remain.
Looking at get_editable_roles()
I can see that the global $wp_roles->roles
is empty, although $wp_roles->role_objects
is correctly populated. From here, I don’t really know where to go next.
Can anybody please suggest how I may fix this problem?