From 12dc82c340cfd32e68067e6c2b3f1dd70af76050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 22 Oct 2020 21:51:42 +0200 Subject: [PATCH] Update api_contracts.class.php --- htdocs/contrat/class/api_contracts.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 671ac1177f6..b5a9bd91cf4 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -438,7 +438,7 @@ class Contracts extends DolibarrApi * * @url DELETE {id}/lines/{lineid} * - * @return int + * @return array|mixed * * @throws RestException 401 * @throws RestException 404 @@ -474,7 +474,7 @@ class Contracts extends DolibarrApi * @param int $id Id of contract to update * @param array $request_data Datas * - * @return int + * @return array|mixed */ public function put($id, $request_data = null) { @@ -495,8 +495,7 @@ class Contracts extends DolibarrApi $this->contract->$field = $value; } - if ($this->contract->update(DolibarrApiAccess::$user) > 0) - { + if ($this->contract->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->contract->error);