From 20c70691e460f90ba1ac46cacf1abc78002cb8bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 1 Nov 2020 21:37:04 +0100 Subject: [PATCH] Better compatibility php8 --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 8e3e49fe2be..2f60be4b05d 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -897,7 +897,7 @@ class User extends CommonObject } else { if (empty($this->rights->$module->$perms)) $this->nb_rights++; // if we have already define a subperm like this $this->rights->$module->level1->level2 with llx_user_rights, we don't want override level1 because the level2 can be not define on user group - if (!is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = 1; + if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = 1; } } $i++;