From a142d48d269c44e072e39bbff1ac3c0fc1975655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 27 Aug 2023 09:19:58 +0200 Subject: [PATCH] phpstan --- htdocs/reception/class/api_receptions.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/reception/class/api_receptions.class.php b/htdocs/reception/class/api_receptions.class.php index 7161401b292..49b65d5c5e4 100644 --- a/htdocs/reception/class/api_receptions.class.php +++ b/htdocs/reception/class/api_receptions.class.php @@ -642,7 +642,7 @@ class Receptions extends DolibarrApi throw new RestException(404, 'Reception not found'); } - if (!DolibarrApi::_checkAccessToResource('reception', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('reception', $this->reception->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -651,7 +651,7 @@ class Receptions extends DolibarrApi throw new RestException(304, 'Error nothing done. May be object is already closed'); } if ($result < 0) { - throw new RestException(500, 'Error when closing Order: '.$this->commande->error); + throw new RestException(500, 'Error when closing Reception: '.$this->reception->error); } // Reload reception