[BUGFIX] Fix rendering SVG icons in FormEngine 97/41797/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 21 Jul 2015 22:15:18 +0000 (00:15 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 22 Jul 2015 13:49:33 +0000 (15:49 +0200)
Resolves: #68452
Releases: master
Change-Id: I7a6b908ff650ad39f09e6610c405b5a520696a62
Reviewed-on: http://review.typo3.org/41797
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Form/Utility/FormEngineUtility.php

index 3a1a776..924a14f 100644 (file)
@@ -195,7 +195,11 @@ class FormEngineUtility {
                } elseif (substr($icon, 0, 3) == '../') {
                        $selIconFile = GeneralUtility::resolveBackPath($icon);
                        if (is_file(PATH_site . GeneralUtility::resolveBackPath(substr($icon, 3)))) {
-                               $selIconInfo = getimagesize((PATH_site . GeneralUtility::resolveBackPath(substr($icon, 3))));
+                               if (\TYPO3\CMS\Core\Utility\StringUtility::endsWith($icon, '.svg')) {
+                                       $selIconInfo = TRUE;
+                               } else {
+                                       $selIconInfo = getimagesize((PATH_site . GeneralUtility::resolveBackPath(substr($icon, 3))));
+                               }
                        }
                } elseif (substr($icon, 0, 4) == 'ext/' || substr($icon, 0, 7) == 'sysext/') {
                        $selIconFile = $icon;