[TASK] Install tool fails if LocalConfiguration EXT/extConf does not exist 44/55044/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 12 Dec 2017 11:45:04 +0000 (12:45 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Tue, 12 Dec 2017 12:54:22 +0000 (13:54 +0100)
On fresh instances, the install tool may fail if path EXT/extConf
which is written as b/w compat layer does not exist, yet.
Patch catches the (generic) exception from ArrayUtility->getValueByPath()
and initializes the value to an empty array to continue in this case.

Resolves: #83298
Related: #82368
Releases: master
Change-Id: Iffac458a9e42183139ab4425082abb6f78944ffd
Reviewed-on: https://review.typo3.org/55044
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/install/Classes/Controller/LayoutController.php

index 7dd54bb..6f775f9 100644 (file)
@@ -104,7 +104,12 @@ class LayoutController extends AbstractController
     public function executeSilentLegacyExtConfExtensionConfigurationUpdateAction(): ResponseInterface
     {
         $configurationManager = new ConfigurationManager();
-        $oldExtConfSettings = $configurationManager->getConfigurationValueByPath('EXT/extConf');
+        try {
+            $oldExtConfSettings = $configurationManager->getConfigurationValueByPath('EXT/extConf');
+        } catch (\RuntimeException $e) {
+            // The old 'extConf' array may not exist anymore, set to empty array if so.
+            $oldExtConfSettings = [];
+        }
         $newExtensionSettings = $configurationManager->getConfigurationValueByPath('EXTENSIONS');
         foreach ($oldExtConfSettings as $extensionName => $extensionSettings) {
             if (!array_key_exists($extensionName, $newExtensionSettings)) {