Skip to content
Snippets Groups Projects
Commit d6c90bbe authored by Nicole Cordes's avatar Nicole Cordes Committed by Helmut Hummel
Browse files

[BUGFIX] Update LocalConfiguration fails

Due to changes in function
TYPO3\CMS\Core\Configuration\ConfigurationManager::writeLocalConfiguration
an error is thrown when the configuration file isn't accessable.

Of course when updating the system from a lower version it is not
available. So the installation process has to create the file on its own
to be able to write the settings.

Change-Id: I89553390ebd9f1f576311535e02ec73da6618cd6
Fixes: #42271
Releases: 6.0
Reviewed-on: http://review.typo3.org/16088
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
parent 451dcf95
Branches
Tags
No related merge requests found
......@@ -108,6 +108,11 @@ class LocalConfigurationUpdate extends \TYPO3\CMS\Install\Updates\AbstractUpdate
// Add db settings to array
$TYPO3_CONF_VARS['DB'] = $typo3DatabaseVariables;
$TYPO3_CONF_VARS = \TYPO3\CMS\Core\Utility\ArrayUtility::sortByKeyRecursive($TYPO3_CONF_VARS);
// Build new (empty) LocalConfiguration file if not exists as the function writeLocalConfiguration depends on it
\TYPO3\CMS\Core\Utility\GeneralUtility::writeFile(
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager')->getLocalConfigurationFileResource(),
''
);
// Write out new LocalConfiguration file
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager')->writeLocalConfiguration($TYPO3_CONF_VARS);
// Write out new AdditionalConfiguration file
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment