• OK, so I’m new to wordpress and managing my school’s website; a group wanted a discussion board on their reunion page so I tried installing the plugin WPBB and after installing and changing the Facebook setting I started getting this error repeating over and over again at the top of the page:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/content/73/8789473/html/wp-content/themes/custom-community/admin/config.php on line 19

    Warning: array_shift() [function.array-shift]: The argument should be an array in /home/content/73/8789473/html/wp-content/themes/custom-community/admin/config.php on line 19

    I didn’t publish anything or actually use the forum, just installed the plug in. I have since uninstalled the plugin but can’t find where to fix this error. Can someone help me out?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mlindgren

    (@mlindgren)

    If it helps to see, my school’s website is located at:

    luthernorthcollegeprep.org

    Thread Starter mlindgren

    (@mlindgren)

    Looking at the php file it is leading me to this is what I see:

    $themename = 'Theme'; // used on the title of the custom admin page
    $req_cap_to_edit = 'read'; // the user capability that is required to access the CheezCap settings page
    function cc_get_user_roles(){
        global $wp_roles;
        $return_roles = array();
        if(!empty($wp_roles)){
            $roles = $wp_roles->roles;
            foreach ($roles as $role){
    <**Line 19**>            $max_cap = array_shift(array_keys($role['capabilities']));
                $return_roles[$max_cap] = $role['name'];
            }
        }
        return $return_roles;
    
    }

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]

    Line 19 is the area bolded. I’ve tried updating the theme and it did not change anything. Is there anything wrong with that particular line of code that I can change? What would I need to do to not lose my page and reinstalling WP? Or should I just call godaddy and see if they can roll it back for me?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Need help with Warning:array_keys and Warning:array_shift’ is closed to new replies.