Answer the question
In order to leave comments, you need to log in
How to fix Undefined offset: 0 in capabilities.php error?
Hello everyone, there is a site for selling pizza woordpress + woocommerce, since the delivery has expanded to other cities, there was a need to create a multisite, I created it according to the instructions, the problem appeared immediately on the local server, I can’t go to the site with a subdomain, I don’t know if this is related to that that the site is local or not, I replaced .htaccess according to the instructions, it didn’t help, but okay, I’ll figure it out, the problem is different, an error appeared on the main site
Notice: Undefined offset: 0 in C:\OpenServer\domains\pizza2.loc\wp- includes\capabilities.php on line 68
here is a piece of code from the file:
// In multisite the user must have manage_network_users caps. If editing a super admin, the user must be a super admin.
if ( is_multisite() && ( ( ! is_super_admin( $user_id ) && 'edit_user' === $cap && is_super_admin( $args[0] ) ) || ! user_can( $user_id, 'manage_network_users' ) ) ) {
$caps[] = 'do_not_allow';
} else {
$caps[] = 'edit_users'; // edit_user maps to edit_users.
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question