diff --git a/lib/plugins/db/RolePersistence.class.php b/lib/plugins/db/RolePersistence.class.php index bc8490b4cee6a2cc37b3ff0f72923749801f13f7..25925951b3af7104a6c52528296be26dab0300c8 100644 --- a/lib/plugins/db/RolePersistence.class.php +++ b/lib/plugins/db/RolePersistence.class.php @@ -247,7 +247,7 @@ class RolePersistence WHERE `permname` = :perm"; $statement = DBManager::get()->prepare($query); $statement->bindValue(':user_id', $user_id); - $statement->bindValue(':perm', is_object($GLOBALS['perm']) ? $GLOBALS['perm']->get_perm($user_id) : 'nobody'); + $statement->bindValue(':perm', empty($GLOBALS['perm']) ? 'nobody' : $GLOBALS['perm']->get_perm($user_id)); $statement->execute(); $statement->setFetchMode(PDO::FETCH_ASSOC);