Better compatibility php8

This commit is contained in:
Laurent Destailleur 2020-11-01 21:37:04 +01:00
parent 41965381fd
commit 20c70691e4

View File

@ -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++;