update code for PHP8 compliance

This commit is contained in:
Philippe GRAND
2022-08-09 10:40:08 +02:00
parent 001d326a8c
commit b8a29fbcb2

View File

@@ -120,7 +120,7 @@ if ($user->socid > 0) {
// For some module part, dir may be privates
if (in_array($modulepart, array('facture_paiement', 'unpaid'))) {
if (empty($user->rights->societe->client->voir) || $socid) {
if (empty($user->hasRight('societe', 'client', 'voir')) || $socid) {
$original_file = 'private/'.$user->id.'/'.$original_file; // If user has no permission to see all, output dir is specific to user
}
}