Skip to content
Snippets Groups Projects
Commit e02418ec authored by Thomas Maroschik's avatar Thomas Maroschik
Browse files

[BUGFIX] Fix bad preconditions for PackageStates migration

The PackageStates.php file migration from LocalConfiguration.php happens
transparently upon the first call of the install tool. If the file
LocalConfiguration.php is not available yet, like during installation
from a blank package this step fails.

This patch introduces some more checks that check if typo3conf and
LocalConfiguration.php are present before the migration of PackageStates
kicks in.

Resolves: #52847
Releases: 6.2
Change-Id: I5dede4123ad1474c0493c85d96350fd6cfdc04c4
Reviewed-on: https://review.typo3.org/24793
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
parent 498ca1e9
No related merge requests found
......@@ -267,7 +267,11 @@ class StepController extends AbstractController {
*/
protected function migrateExtensionListToPackageStatesFile() {
try {
if (file_exists(PATH_typo3conf . 'PackageStates.php')) {
/** @var \TYPO3\CMS\Core\Configuration\ConfigurationManager $configurationManager */
$configurationManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
$localConfigurationFileLocation = $configurationManager->getLocalConfigurationFileLocation();
$localConfigurationFileExists = is_file($localConfigurationFileLocation);
if (!is_dir(PATH_typo3conf) || (is_dir(PATH_typo3conf) && !$localConfigurationFileExists) || file_exists(PATH_typo3conf . 'PackageStates.php')) {
return;
}
$bootstrap = \TYPO3\CMS\Core\Core\Bootstrap::getInstance();
......
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