From 37e9d139827b1167db475938b4de53dab57a7b86 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Jan 2021 21:25:37 +0100 Subject: [PATCH 1/2] 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); From f328bdc3f998f7b6122cd506dec180de4d9fa03d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Jan 2021 22:05:12 +0100 Subject: [PATCH 2/2] Fix var name --- htdocs/admin/tools/listevents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 00c4bdc36dd..57fc2d07011 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -211,7 +211,7 @@ if ($result) if ($search_user) $param .= '&search_user='.urlencode($search_user); if ($search_desc) $param .= '&search_desc='.urlencode($search_desc); if ($search_ua) $param .= '&search_ua='.urlencode($search_ua); - if ($search_prefix_sessiona) $param .= '&search_prefix_session='.urlencode($search_prefix_session); + if ($search_prefix_session) $param .= '&search_prefix_session='.urlencode($search_prefix_session); if ($date_startmonth) $param .= "&date_startmonth=".urlencode($date_startmonth); if ($date_startday) $param .= "&date_startday=".urlencode($date_startday); if ($date_startyear) $param .= "&date_startyear=".urlencode($date_startyear);