// Fix PSCFV-4060
This commit is contained in:
1 parent
8c548e2e22
commit
25625c3d5a
2 files changed
+6
-2
No files matched your search
@@ -1476,16 +1476,16 @@ class WebserviceRequestCore
|
|||||||
}
|
}
|
||||||
elseif ((!isset($fieldProperties['required']) || !$fieldProperties['required']) && property_exists($object, $sqlId))
|
elseif ((!isset($fieldProperties['required']) || !$fieldProperties['required']) && property_exists($object, $sqlId))
|
||||||
$object->$sqlId = null;
|
$object->$sqlId = null;
|
||||||
|
|
||||||
if (isset($fieldProperties['i18n']) && $fieldProperties['i18n'])
|
if (isset($fieldProperties['i18n']) && $fieldProperties['i18n'])
|
||||||
{
|
{
|
||||||
$i18n = true;
|
$i18n = true;
|
||||||
if (isset($attributes->$fieldName, $attributes->$fieldName->language))
|
if (isset($attributes->$fieldName, $attributes->$fieldName->language))
|
||||||
foreach ($attributes->$fieldName->language as $lang)
|
foreach ($attributes->$fieldName->language as $lang)
|
||||||
$object->{$fieldName}[(int)$lang->attributes()->id] = (string)$lang;
|
$object->{$fieldName}[(int)$lang->attributes()->id] = (string)$lang;
|
||||||
|
else
|
||||||
|
$object->{$fieldName} = (string)$attributes->$fieldName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->hasErrors())
|
if (!$this->hasErrors())
|
||||||
{
|
{
|
||||||
if ($i18n && ($retValidateFieldsLang = $object->validateFieldsLang(false, true)) !== true)
|
if ($i18n && ($retValidateFieldsLang = $object->validateFieldsLang(false, true)) !== true)
|
||||||
|
|||||||
@@ -976,6 +976,10 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
|||||||
}
|
}
|
||||||
@unlink($tmpName);
|
@unlink($tmpName);
|
||||||
$this->imgToDisplay = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format;
|
$this->imgToDisplay = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format;
|
||||||
|
$this->objOutput->setFieldsToDisplay('full');
|
||||||
|
$this->output = $this->objOutput->renderEntity($image, 1);
|
||||||
|
$image_content = array('sqlId' => 'content', 'value' => file_get_contents($this->imgToDisplay));
|
||||||
|
$this->output .= $this->objOutput->objectRender->renderField($image_content);
|
||||||
}
|
}
|
||||||
elseif ($this->imageType == 'categories')
|
elseif ($this->imageType == 'categories')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user