Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have edited the reference & have gotten past the fatal error and now the plugin can activate, however there are even more problems with this plugin. Once this error was corrected, my site now renders correctly when logged in. However, when not logged in, I get warnings on the main page.

    Warning: Creating default object from empty value in …/wp-content/plugins/user-access-manager/class/UamAccessHandler.class.php on line 678

    Line 678 is part of this function call:

    /**
         * Return the role of the user.
         *
         * @param integer $userId The user id.
         *
         * @return string|null
         */
        private function _getUserRole($userId)
        {
            global $wpdb;
    
            $curUserdata = get_userdata($userId);
    
            if (!isset($curUserdata->user_level)) {
                $curUserdata->user_level = null;
            }
    
            if (isset($curUserdata->{$wpdb->prefix . "capabilities"})) {
                $capabilities = $curUserdata->{$wpdb->prefix . "capabilities"};
            } else {
                $capabilities = null;
            }
    
            $role  = (is_array($capabilities) && count($capabilities) > 0) ? array_keys($capabilities) : array('norole');
    
            return trim($role[0]);
        }

    Specifically the “$curUserdata->user_level = null;” line.

    Your help is greatly appreciated!

    I have disabled all error reporting which has returned my home page to it’s former state & everything seems to be working as it should, but I would like to know how to fix this appropriately.

    I believe I am trying to do the same thing as you. I have several categories that I would like to create tag clouds for and the selection in the options is not correctly displaying the tag clouds. I am trying to use this to show all of the different call types that my fire department goes on (defined as tags) and am splitting them up into categories based on the year that the calls were made in.

    Your way sounds cleaner, but I do not understand how you are defining the global variable. Could you expand on your fix?

    Thanks!!

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