[BUGFIX] Check TBE_STYLES skins for being an array 45/32645/2
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 8 Sep 2014 14:48:11 +0000 (16:48 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 8 Sep 2014 21:03:05 +0000 (23:03 +0200)
If no skinning extension is installed, an exception is thrown which
makes it impossible to use the system. Therefore the variable must
be checked.

Resolves: #61446
Releases: 6.3
Change-Id: Iefd603199d69d0609b662f3b89a5ea6fb479e50f
Reviewed-on: http://review.typo3.org/32645
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Sprite/SpriteManager.php

index 7609181..1523c7c 100644 (file)
@@ -93,8 +93,10 @@ class SpriteManager {
                $handler->generate();
                // Get all icons registered from skins, merge with core icon list
                $availableSkinIcons = (array) $GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'];
-               foreach ($GLOBALS['TBE_STYLES']['skins'] as $skinData) {
-                       $availableSkinIcons = array_merge($availableSkinIcons, (array) $skinData['availableSpriteIcons']);
+               if (isset($GLOBALS['TBE_STYLES']['skins']) && is_array($GLOBALS['TBE_STYLES']['skins'])) {
+                       foreach ($GLOBALS['TBE_STYLES']['skins'] as $skinData) {
+                               $availableSkinIcons = array_merge($availableSkinIcons, (array)$skinData['availableSpriteIcons']);
+                       }
                }
                // Merge icon names provided by the skin, with
                // registered "complete sprites" and the handler class