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>
* 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
* 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']
*/
static public function pngToGifByImagemagick($theFile) {
if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif']
|| strtolower(substr($theFile, -4, 4)) !== '.png'
|| !@is_file($theFile)
) {
|| strtolower(substr($theFile, -4, 4)) !== '.png'
|| !@is_file($theFile)
) {
}
$newFile = substr($theFile, 0, -4) . '.gif';
}
$newFile = substr($theFile, 0, -4) . '.gif';