From b8a29fbcb2c3d02afa5c1c29ada8403ed849ca02 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 9 Aug 2022 10:40:08 +0200 Subject: [PATCH] update code for PHP8 compliance --- htdocs/document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/document.php b/htdocs/document.php index a33708e3e77..e432d6a92f1 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -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 } }