diff --git a/application/core/LS_Twig_Extension.php b/application/core/LS_Twig_Extension.php index 0957ce1ce2d..636706afe5e 100644 --- a/application/core/LS_Twig_Extension.php +++ b/application/core/LS_Twig_Extension.php @@ -268,7 +268,7 @@ public static function assetPublish($sRessource) public static function image($sImagePath, $alt = '', $htmlOptions = array( )) { $sUrlImgAsset = self::imageSrc($sImagePath,''); - if(!$sUrlImgAsset) { + if( $sUrlImgAsset === "ERROR") { return ''; } return CHtml::image($sUrlImgAsset, $alt, $htmlOptions); @@ -292,7 +292,7 @@ public static function imageSrc($sImagePath, $default = false) if($default) { return self::imageSrc($default); } - return false; + return "ERROR"; } $sFullPath = Yii::app()->getConfig('rootdir').'/'.$sImagePath; } @@ -301,7 +301,7 @@ public static function imageSrc($sImagePath, $default = false) $checkImage = LSYii_ImageValidator::validateImage($sFullPath); if (!$checkImage['check']) { - return false; + return "ERROR"; } $sUrlImgAsset = self::assetPublish($sFullPath);