update code toward php8 compliance

This commit is contained in:
Philippe GRAND 2022-09-25 18:02:48 +02:00
parent 7732fabd80
commit f2e7e0b210
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ if (!isModEnabled('accounting')) {
if ($user->socid > 0) {
accessforbidden();
}
if (empty($user->rights->accounting->mouvements->lire)) {
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
accessforbidden();
}
@ -126,7 +126,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_tvaintra = '';
}
if (is_array($changeaccount) && count($changeaccount) > 0 && $user->rights->accounting->bind->write) {
if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight('accounting', 'bind', 'write')) {
$error = 0;
if (!(GETPOST('account_parent', 'int') >= 0)) {

View File

@ -110,7 +110,7 @@ if (!isModEnabled('accounting')) {
if ($user->socid > 0) {
accessforbidden();
}
if (empty($user->rights->accounting->mouvements->lire)) {
if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
accessforbidden();
}