fix warning

This commit is contained in:
Frédéric FRANCE 2021-10-22 22:05:04 +02:00 committed by GitHub
parent d45052a6b7
commit 9ca8dfcef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,14 +51,14 @@ $confirm = GETPOST('confirm', 'alpha');
$chartofaccounts = GETPOST('chartofaccounts', 'int');
$permissiontoadd = $user->rights->accounting->chartofaccount;
$permissiontodelete = $user->rights->accounting->chartofaccount;
$permissiontoadd = !empty($user->rights->accounting->chartofaccount);
$permissiontodelete = !empty($user->rights->accounting->chartofaccount);
// Security check
if ($user->socid > 0) {
accessforbidden();
}
if (!$user->rights->accounting->chartofaccount) {
if (empty($user->rights->accounting->chartofaccount)) {
accessforbidden();
}