[-] WS: Fix #PSCFV-4830

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17826 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-10-10 14:27:29 +00:00
parent ab0e00e7d8
commit 965f34494e
@@ -534,9 +534,10 @@ class WebserviceOutputBuilderCore
$field = $this->overrideSpecificField($ws_params['objectsNodeName'], $field_name, $field, $object, $ws_params);
// don't display informations for a not existant id
if (substr($field['sqlId'], 0, 3) == 'id_' && $field['value'] == 0)
if (substr($field['sqlId'], 0, 3) == 'id_' && !$field['value'])
{
$field['value'] = '';
if ($field['value'] === null)
$field['value'] = '';
// delete the xlink except for schemas
if (isset($field['xlink_resource']) && is_null($this->schemaToDisplay))
unset($field['xlink_resource']);