Fix warning

This commit is contained in:
Laurent Destailleur 2020-12-30 12:31:33 +01:00
parent 87a452c6f4
commit 7e9fcfe664

View File

@ -387,10 +387,10 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '')
if ($result > 0) if ($result > 0)
{ {
// Security for external user // Security for external user
if ($socid && ($socid != $order->socid)) if ($socid && (empty($order->socid) || $socid != $order->socid))
{ {
$error++; $error++;
$errorcode = 'PERMISSION_DENIED'; $errorlabel = $order->socid.'User does not have permission for this request'; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request';
} }
if (!$error) if (!$error)