• When I try to login to my site, I receive these 2 error messages:

    Warning: array_keys() expects parameter 1 to be array, null given in /home2/macromob/public_html/wp-content/plugins/content-mask/content-mask.php on line 356

    Warning: Invalid argument supplied for foreach() in /home2/macromob/public_html/wp-content/plugins/content-mask/content-mask.php on line 359

    Here are lines 350 to 362 in content-mask.php
    public function can_mask_content(){
    global $wp_roles;
    $current_user = wp_get_current_user();
    $user_roles = $current_user->roles;

    $primary_role = array_shift($user_roles);
    $roles = array_keys($wp_roles->roles);

    $disabled_roles = array();
    foreach( $roles as $role ){
    $option = ‘role_disable_’.str_replace(‘-‘, ‘_’, sanitize_title($role));
    if( filter_var( get_option( “content_mask_$option” ), FILTER_VALIDATE_BOOLEAN ) ){
    $disabled_roles[] = $role;

    I am not a programmer and have no idea what to do to fix the problem. If I rename the plugin using filezilla, I can login to my site and then name it back to it’s correct file name, but I’d rather fix the php file. Anyone help?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t login to site’ is closed to new replies.