I am getting the error: (I searched for this error and saw nothing comparable)
Notice: Undefined property: stdClass::$permissions in
For this line of code: $permissions = json_decode($group->first()->permissions, true);
It is from this:
public function hasPermission($key) {
        $group = $this->_db->get('groups', array('id', '=', $this->data()->group));
        if($group->count()) {
            $permissions = json_decode($group->first()->permissions, true);
            if($permissions[$key] == true) {
                return true;
            }
        }
        return false;
    }
I call for it like so:
if($user->hasPermission('User')) {
    include 'navUser.php';
}
I am unsure what I am doing wrong. This is from a framework and it works on my other sites, the only difference from this site is the folder I am trying to call it from is within a sub-folder, which the other sites the pages were within the root.
What am I doing wrong?
