[TASK] Prevent notice in InstallStatusReport 15/58215/5
authorRoland Golla <rolandgolla@gmail.com>
Fri, 7 Sep 2018 13:21:14 +0000 (15:21 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 7 Sep 2018 20:36:25 +0000 (22:36 +0200)
Add isset check before use is_array.
This will prevent a notice if the
array key does not exist.

Resolves: #86187
Releases: master
Change-Id: I6f74f2200981802ffe2d9ca527ed7230c0d75b27
Reviewed-on: https://review.typo3.org/58215
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/install/Classes/Report/InstallStatusReport.php

index 36a0d02..64f030a 100644 (file)
@@ -151,7 +151,7 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
         $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
         // check if there are update wizards left to perform
-        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] ?? null)) {
             $versionAsInt = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
             $incompleteWizardFound = false;
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] as $identifier => $className) {