Browse Source

Fix warning

Laurent Destailleur 3 years ago
parent
commit
370642213f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      htdocs/webservices/server_thirdparty.php

+ 1 - 1
htdocs/webservices/server_thirdparty.php

@@ -462,7 +462,7 @@ function createThirdParty($authentication, $thirdparty)
 		if ($thirdparty['country_code']) {
 			$newobject->country_id = getCountry($thirdparty['country_code'], 3);
 		}
-		$newobject->region_code = $thirdparty['region_code'];
+		$newobject->region_code = empty($thirdparty['region_code']) ? '' : $thirdparty['region_code'];
 		//if ($thirdparty['province_code']) $newobject->province_code=getCountry($thirdparty['province_code'],3);
 
 		$newobject->phone = $thirdparty['phone'];