[BUGFIX] Extension config: Write LocalConfiguration only if needed 13/55413/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 19 Jan 2018 16:30:11 +0000 (17:30 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 19 Jan 2018 17:31:01 +0000 (18:31 +0100)
The extension configuration is currently written by the
install tool silent updater each time the install tool
is entered, even if no configuration detail changed.
This is unfortunate on systems with read-only LocalConfiguration
since the install tool then throws an early fatal.
Prevent that write operation in case nothing changed.

Change-Id: I70d419690bcb633049ffcc9546e660d2f3b75a4c
Resolves: #83616
Releases: master
Reviewed-on: https://review.typo3.org/55413
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/install/Classes/Service/ExtensionConfigurationService.php

index 741a3f0..0f81409 100644 (file)
@@ -154,7 +154,10 @@ class ExtensionConfigurationService
         }
         $extConfTemplateConfiguration = $this->getExtConfTablesWithoutCommentsAsNestedArrayWithoutDots($extensionKey);
         ArrayUtility::mergeRecursiveWithOverrule($extConfTemplateConfiguration, $currentLocalConfiguration);
-        $extensionConfiguration->set($extensionKey, '', $extConfTemplateConfiguration);
+        // Write new config if changed. Loose array comparison to not write if only array key order is different
+        if ($extConfTemplateConfiguration != $currentLocalConfiguration) {
+            $extensionConfiguration->set($extensionKey, '', $extConfTemplateConfiguration);
+        }
     }
 
     /**