diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index d464d64a99c..ea8ea85fa32 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -777,11 +777,11 @@ function getProductsForCategory($authentication,$id,$lang='') 'id' => $obj->id, 'ref' => $obj->ref, 'ref_ext' => $obj->ref_ext, - 'label' => $obj->multilangs[$langs->defaultlang]["label"]?$obj->multilangs[$langs->defaultlang]["label"]:$obj->label, - 'description' => $obj->multilangs[$langs->defaultlang]["description"]?$obj->multilangs[$langs->defaultlang]["description"]:$obj->description, + 'label' => ! empty($obj->multilangs[$langs->defaultlang]["label"]) ? $obj->multilangs[$langs->defaultlang]["label"] : $obj->label, + 'description' => ! empty($obj->multilangs[$langs->defaultlang]["description"]) ? $obj->multilangs[$langs->defaultlang]["description"] : $obj->description, 'date_creation' => dol_print_date($obj->date_creation,'dayhourrfc'), 'date_modification' => dol_print_date($obj->date_modification,'dayhourrfc'), - 'note' => $obj->multilangs[$langs->defaultlang]["note"]?$obj->multilangs[$langs->defaultlang]["note"]:$obj->note, + 'note' => ! empty($obj->multilangs[$langs->defaultlang]["note"]) ? $obj->multilangs[$langs->defaultlang]["note"] : $obj->note, 'status_tosell' => $obj->status, 'status_tobuy' => $obj->status_buy, 'type' => $obj->type,