(Retrofit from trunk) N°1123 AttributeImage: PHP notice when displaying an object without default_image on a AttributeImage attribute.

SVN:2.4[5039]
This commit is contained in:
Guillaume Lajarige
2017-10-18 14:44:19 +00:00
parent ae8311e224
commit 70561d6331

View File

@@ -5522,7 +5522,7 @@ class AttributeImage extends AttributeBlob
{
$iMaxWidthPx = $this->Get('display_max_width');
$iMaxHeightPx = $this->Get('display_max_height');
$sUrl = $this->Get('default_image');
$sUrl = $this->GetOptional('default_image', '');
$sRet = '<img src="'.$sUrl.'" style="max-width: '.$iMaxWidthPx.'px; max-height: '.$iMaxHeightPx.'px">';
if (is_object($value) && !$value->IsEmpty())
{