From 37e9d139827b1167db475938b4de53dab57a7b86 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Jan 2021 21:25:37 +0100 Subject: [PATCH] Fix warning --- htdocs/webservices/server_thirdparty.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index 4bed0e1be3b..7c97159d0bb 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -510,7 +510,7 @@ function createThirdParty($authentication, $thirdparty) $db->commit(); // Patch to add capability to associate (one) sale representative - if ($thirdparty['commid'] && $thirdparty['commid'] > 0) + if (!empty($thirdparty['commid']) && $thirdparty['commid'] > 0) $newobject->add_commercial($fuser, $thirdparty["commid"]); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref);