diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index d5f47502a9..433a60c47f 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -5538,8 +5538,8 @@ class AttributeImage extends AttributeBlob { $iMaxWidthPx = $this->Get('display_max_width'); $iMaxHeightPx = $this->Get('display_max_height'); - $sUrl = $this->GetOptional('default_image', ''); - $sRet = ''; + $sUrl = $this->Get('default_image'); + $sRet = ($sUrl !== null) ? '' : ''; if (is_object($value) && !$value->IsEmpty()) { if ($oHostObject->IsNew() || ($oHostObject->IsModified() && (array_key_exists($this->GetCode(), $oHostObject->ListChanges())))) diff --git a/core/pdfbulkexport.class.inc.php b/core/pdfbulkexport.class.inc.php index 0006e01991..d27cd67e5f 100644 --- a/core/pdfbulkexport.class.inc.php +++ b/core/pdfbulkexport.class.inc.php @@ -226,9 +226,9 @@ EOF $iNewWidth = $iWidth * $fScale; $iNewHeight = $iHeight * $fScale; - $sUrl = 'data:' . $value->GetMimeType() . ';base64,' . base64_encode($value->GetData()); + $sUrl = 'data:'.$value->GetMimeType().';base64,'.base64_encode($value->GetData()); } - $sRet = ''; + $sRet = ($sUrl !== null) ? '' : ''; $sRet = '
'.$sRet.'
'; } else diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index c547886b47..07e0da2562 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -1252,6 +1252,11 @@ EOF { $aParameters['default_image'] = "utils::GetAbsoluteUrlModulesRoot().'$sModuleRelativeDir/$sDefault'"; } + else + { + // Note: We don't put null as default param value because it would be ignored by the final checks + $aParameters['default_image'] = 'null'; + } } elseif ($sAttType == 'AttributeStopWatch') {