From: Philipp Gampe Date: Sun, 1 Feb 2015 12:11:52 +0000 (+0100) Subject: [BUGFIX] Followup: Move functions to GraphicalFunctions X-Git-Tag: 7.1.0~149 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/0ecfb5c373765d728dc2aed124ad944d2dffc4dd [BUGFIX] Followup: Move functions to GraphicalFunctions Change back to the old behavior to return the orginal file in case no png_to_gif convertion should happen. Resolves: #46589 Releases: master Change-Id: I2815ce0767c8c0d8466972cb094239fdde03364f Reviewed-on: http://review.typo3.org/36567 Reviewed-by: Oliver Klee Tested-by: Jana Kienast Tested-by: Michael Oehlhof Tested-by: Andrea Herzog-Kienast Reviewed-by: Michael Oehlhof Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe --- diff --git a/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php b/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php index fd2a82e882cb..8cb42e7de5d8 100644 --- a/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php +++ b/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php @@ -2608,7 +2608,7 @@ class GraphicalFunctions { * This converts a png file to gif IF the FLAG $GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] is set TRUE. * * @param string $theFile The filename with path - * @return string|NULL New filename + * @return string New filename or the old file name if no conversion happened */ static public function pngToGifByImagemagick($theFile) { if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] @@ -2617,7 +2617,7 @@ class GraphicalFunctions { || strtolower(substr($theFile, -4, 4)) !== '.png' || !@is_file($theFile) ) { - return NULL; + return $theFile; } $newFile = substr($theFile, 0, -4) . '.gif';