Merge pull request #22598 from ptibogxiv/patch-54

Fix php 8 error
This commit is contained in:
Laurent Destailleur 2022-10-17 23:12:28 +02:00 committed by GitHub
commit 13e22647f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,6 +242,7 @@ class Tickets extends DolibarrApi
$socid = DolibarrApiAccess::$user->socid;
}
$search_sale = null;
// If the internal user must only see his customers, force searching by him
if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) {
$search_sale = DolibarrApiAccess::$user->id;