diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 0d01072f8e8..351fb39e1f7 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -368,7 +368,12 @@ class Products extends DolibarrApi $this->product->context['caller'] = sanitizeVal($request_data['caller'], 'aZ09'); continue; } - + if ($field == 'array_options' && is_array($value)) { + foreach ($value as $index => $val) { + $this->product->array_options[$index] = $this->_checkValForAPI($field, $val, $this->product); + } + continue; + } $this->product->$field = $this->_checkValForAPI($field, $value, $this->product); }