소스 검색

N°1123 AttributeImage: PHP notice when displaying an object without default_image on a AttributeImage attribute.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@5031 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 7 년 전
부모
커밋
7c8712ee20
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/attributedef.class.inc.php

+ 1 - 1
core/attributedef.class.inc.php

@@ -5538,7 +5538,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())
 		{