[BUGFIX] Catch all errors in EM ViewHelper
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 6 Dec 2012 15:12:13 +0000 (16:12 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Fri, 7 Dec 2012 06:45:07 +0000 (07:45 +0100)
Catching all errors which can happen during image generation
to avoid a non caught exception for users.

Problem is especially the Exception "File has been deleted"
which happens at some sites when having empty
typo3temp/_processed_/ directory and empty sys_file DB table.

Change-Id: I5f4e9ce520c828c222f91a2a816263cd433c5c60
Fixes: #43484
Releases: 6.1, 6.0
Reviewed-on: http://review.typo3.org/16993
Reviewed-by: Mattias Nilsson
Tested-by: Wolfgang Freund
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/extensionmanager/Classes/ViewHelpers/ImageViewHelper.php

index 13ba1a1..5b03762 100644 (file)
@@ -75,7 +75,7 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper {
                $image = '';
                try {
                        $image = parent::render($src, $width, $height, $minWidth, $minHeight, $maxWidth, $maxHeight);
                $image = '';
                try {
                        $image = parent::render($src, $width, $height, $minWidth, $minHeight, $maxWidth, $maxHeight);
-               } catch (\TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException $e) {
+               } catch (\Exception $e) {
 
                }
                return $image;
 
                }
                return $image;