[BUGFIX] Upgrade wizard crashes if never updated before 38/45438/2
authorPhilipp Gampe <philipp.gampe@typo3.org>
Thu, 24 Dec 2015 23:16:20 +0000 (00:16 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 26 Dec 2015 16:35:17 +0000 (17:35 +0100)
If the array $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']
is not set, the upgrade wizard crashes.

Resolves: #72435
Releases: master
Change-Id: Ibb794972917ff5aa0934af7ad88fdfb609e72a8e
Reviewed-on: https://review.typo3.org/45438
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/install/Classes/Controller/Action/Tool/UpgradeWizard.php

index 07e727c..65b61be 100644 (file)
@@ -41,6 +41,10 @@ class UpgradeWizard extends Action\AbstractAction
         // ext_localconf, db and ext_tables must be loaded for the updates
         $this->loadExtLocalconfDatabaseAndExtTables();
 
+        if (empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])) {
+            $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] = [];
+        }
+
         // To make sure initialUpdateDatabaseSchema is first wizard, it is added here instead of ext_localconf.php
         $initialUpdateDatabaseSchemaUpdateObject = $this->getUpdateObjectInstance(\TYPO3\CMS\Install\Updates\InitialDatabaseSchemaUpdate::class, 'initialUpdateDatabaseSchema');
         if ($initialUpdateDatabaseSchemaUpdateObject->shouldRenderWizard()) {