update code toward php8 compliance

This commit is contained in:
Philippe GRAND 2022-09-25 17:41:42 +02:00
parent d33ff9b65a
commit 1ab58434c2

View File

@ -35,7 +35,7 @@ $langs->loadLangs(array("admin", "compta"));
if ($user->socid > 0) {
accessforbidden();
}
if (empty($user->rights->accounting->fiscalyear->write)) {
if (!$user->hasRight('accounting', 'fiscalyear', 'write')) {
accessforbidden();
}