From a698c60a7d063ea4d8a92182d502b3f51d0b10aa Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 12 Aug 2022 09:12:09 +0200 Subject: [PATCH] update code for PHP8 compliance --- htdocs/accountancy/closure/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index a1d75440b56..999e2ce5bd1 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -75,7 +75,7 @@ if (empty($user->rights->accounting->fiscalyear->write)) { $now = dol_now(); -if ($action == 'validate_movements_confirm' && !empty($user->rights->accounting->fiscalyear->write)) { +if ($action == 'validate_movements_confirm' && $user->hasRight('accounting', 'fiscalyear', 'write')) { $date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); $date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));