[BUGFIX] Install tool: Allow row updater as valid identifier 90/59290/2
authorThorben Nissen <thorben.nissen@kapp-hamburg.de>
Sun, 23 Dec 2018 21:16:12 +0000 (22:16 +0100)
committerBenni Mack <benni@typo3.org>
Wed, 9 Jan 2019 13:11:02 +0000 (14:11 +0100)
In `UpgradeWizardService::assertIdentifierIsValid` check if the
identifier is a subclass of `RowUpdaterInterface` to avoid an exception
being thrown, when marking a row updater as undone.

Resolves: #87283
Releases: master, 9.5
Change-Id: I1b6a18437aa9d5a423c0a47595feac8b51c28bdb
Reviewed-on: https://review.typo3.org/59290
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Daniel Gorges <daniel.gorges@b13.de>
Tested-by: Daniel Gorges <daniel.gorges@b13.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/install/Classes/Service/UpgradeWizardsService.php

index c76b26c..7b01df1 100644 (file)
@@ -462,7 +462,7 @@ class UpgradeWizardsService
      */
     protected function assertIdentifierIsValid(string $identifier): void
     {
-        if ($identifier === '' || !isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][$identifier])) {
+        if ($identifier === '' || (!isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][$identifier]) && !is_subclass_of($identifier, RowUpdaterInterface::class))) {
             throw new \RuntimeException('No valid wizard identifier given', 1502721731);
         }
     }