[BUGFIX] Deprecation warning with disabled ImageMagick
authorSteffen Gebert <steffen.gebert@typo3.org>
Sat, 5 Nov 2011 12:29:57 +0000 (13:29 +0100)
committerSteffen Gebert <steffen.gebert@typo3.org>
Wed, 9 Nov 2011 18:37:32 +0000 (19:37 +0100)
Although the use of ImageMagick is disabled (by setting
$TYPO3_CONF_VARS['GFX']['im'] = 0), an deprecation log entry is
generated, because the configuration setting for a recent ImageMagick
or GraphicsMagick version (im_version_5) is not used.

Change-Id: Ia578d056f2909a6b86a95a4989942e50ace8ddd2
Fixes: #31596
Releases: 4.5
Reviewed-on: http://review.typo3.org/6556
Reviewed-by: Georg Ringer
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Simon Schaufelberger
Tested-by: Simon Schaufelberger
Tested-by: Steffen Gebert
t3lib/class.t3lib_stdgraphic.php

index ea7509d..6a71aa2 100644 (file)
@@ -238,11 +238,13 @@ class t3lib_stdGraphic {
                if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['png_truecolor']) {
                        $this->png_truecolor = true;
                }
-               if (!$gfxConf['im_version_5']) {
-                       t3lib_div::deprecationLog('The option $TYPO3_CONF_VARS[\'GFX\'][\'im_version_5\'] is not set, ImageMagic 4 is assumed. This is deprecated since TYPO3 4.5, support will be removed in TYPO3 4.6. Make sure to upgrade to ImageMagick version 6 or GraphichsMagick.');
-                       $this->im_version_4 = true;
-               } elseif ($gfxConf['im_version_5'] === 'im5') {
-                       t3lib_div::deprecationLog('The option $TYPO3_CONF_VARS[\'GFX\'][\'im_version_5\'] is set to \'im5\'. This is deprecated since TYPO3 4.5, support will be removed in TYPO3 4.6. Make sure to upgrade to ImageMagick version 6 or GraphichsMagick.');
+               if ($gfxConf['im']) {
+                       if (!$gfxConf['im_version_5']) {
+                               t3lib_div::deprecationLog('The option $TYPO3_CONF_VARS[\'GFX\'][\'im_version_5\'] is not set, ImageMagic 4 is assumed. This is deprecated since TYPO3 4.5, support will be removed in TYPO3 4.6. Make sure to upgrade to ImageMagick version 6 or GraphichsMagick.');
+                               $this->im_version_4 = true;
+                       } elseif ($gfxConf['im_version_5'] === 'im5') {
+                               t3lib_div::deprecationLog('The option $TYPO3_CONF_VARS[\'GFX\'][\'im_version_5\'] is set to \'im5\'. This is deprecated since TYPO3 4.5, support will be removed in TYPO3 4.6. Make sure to upgrade to ImageMagick version 6 or GraphichsMagick.');
+                       }
                }
 
                        // When GIFBUILDER gets used in truecolor mode