FIX Broken Permissions check, $object is null.

This code was probably copy&paste'd from `htdocs/compta/prelevement/card.php` where the `$object` variable exists.

On `htdocs/compta/prelevement/line.php` `$object` is not defined, and `$type` come from the `$type = GETPOST('type', 'aZ09');` which ends up being overwritten with null.
This commit is contained in:
David Pareja Rodriguez 2022-11-23 11:58:21 +01:00
parent 23feae3ee2
commit 05e850dbfc

View File

@ -61,7 +61,7 @@ if ($sortfield == "") {
$sortfield = "pl.fk_soc";
}
$type = $object->type;
if ($type == 'bank-transfer') {
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
} else {