[BUGFIX] Warning in addPlugin() 61/31361/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 5 Jul 2014 16:10:42 +0000 (18:10 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 5 Jul 2014 17:22:50 +0000 (19:22 +0200)
ExtensionManagementUtility::addPlugin() may raise a warning if
a subarray of TYPO3_LOADED_EXT is not set for whatever reason.
The patch sanitizes this.

Change-Id: I4fb8c24bcdebd6b04e856ecad5da07e624d95da4
Resolves: #60122
Related: #59770
Releases: 6.3, 6.2
Reviewed-on: https://review.typo3.org/31361
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php

index d212012..ecbf8f5 100644 (file)
@@ -1249,7 +1249,7 @@ class ExtensionManagementUtility {
                if (!isset($extensionKey)) {
                        throw new \RuntimeException('No extensionKey set in addPlugin(). Provide it as third Parameter', 1404068038);
                }
-               if ($extensionKey && !$itemArray[2]) {
+               if ($extensionKey && !$itemArray[2] && isset($GLOBALS['TYPO3_LOADED_EXT'][$extensionKey]['ext_icon'])) {
                        $itemArray[2] = self::extRelPath($extensionKey) . $GLOBALS['TYPO3_LOADED_EXT'][$extensionKey]['ext_icon'];
                }
                if (is_array($GLOBALS['TCA']['tt_content']['columns']) && is_array($GLOBALS['TCA']['tt_content']['columns'][$type]['config']['items'])) {