[BUGFIX] Fix the additional icon check
authorWouter Wolters <typo3@wouterwolters.nl>
Sat, 13 Oct 2012 15:29:42 +0000 (17:29 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Sat, 13 Oct 2012 15:32:34 +0000 (17:32 +0200)
When looking for additional icons the class AbstractSpriteHandler
a missing check if array on configuration.
Makes the whole TYPO3 installation to crash.

Change-Id: Ib70957da3947f52db220cc42ce311a0771e464f7
Resolves: #41463
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/15569
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/spritemanager/class.t3lib_spritemanager_abstracthandler.php

index a02532a..e06eef4 100644 (file)
@@ -143,7 +143,7 @@ abstract class t3lib_spritemanager_AbstractHandler implements t3lib_spritemanage
 
                                // this method is only needed for TCA tables where
                                // typeicon_classes are not configured
-                       if (!is_array($GLOBALS['TCA'][$tableName]['ctrl']['typeicon_classes'])) {
+                       if (is_array($GLOBALS['TCA'][$tableName]) && !is_array($GLOBALS['TCA'][$tableName]['ctrl']['typeicon_classes'])) {
                                $tcaCtrl = $GLOBALS['TCA'][$tableName]['ctrl'];
 
                                        // adding the default Icon (without types)