diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index cd930f47ad3..4bed0e1be3b 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -486,7 +486,9 @@ function createThirdParty($authentication, $thirdparty) foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; - $newobject->array_options[$key] = $thirdparty[$key]; + if (isset($thirdparty[$key])) { + $newobject->array_options[$key] = $thirdparty[$key]; + } } }