[BUGFIX] Followup: Move functions to GraphicalFunctions 67/36567/5
authorPhilipp Gampe <philipp.gampe@typo3.org>
Sun, 1 Feb 2015 12:11:52 +0000 (13:11 +0100)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Sun, 1 Feb 2015 13:17:10 +0000 (14:17 +0100)
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 <typo3-coding@oliverklee.de>
Tested-by: Jana Kienast <jana.a.kienast@gmail.com>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Andrea Herzog-Kienast <a.herzog@kienastdv.de>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php

index fd2a82e..8cb42e7 100644 (file)
@@ -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';