Commit c967c997 authored by Nicole Cordes's avatar Nicole Cordes Committed by Susanne Moog
Browse files

[BUGFIX] Catch error in database Upgrade Wizard

If an extension provides wrong SQL in ext_tables.sql, the upgrade
wizard is skipped completely. This patch catches the current
exception and outputs the error that needs to be resolved manually.

Resolves: #87187
Releases: master, 9.5
Change-Id: I903ce7fdc9373eee66da7bed86698c42a2731dc7

Reviewed-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Markus Klein's avatarMarkus Klein <>
Reviewed-by: Susanne Moog's avatarSusanne Moog <>
Tested-by: default avatarTYPO3com <>
Tested-by: Benni Mack's avatarBenni Mack <>
Tested-by: Susanne Moog's avatarSusanne Moog <>
parent 06188d7f
......@@ -24,6 +24,7 @@ use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Schema\Exception\StatementException;
use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
use TYPO3\CMS\Core\FormProtection\InstallToolFormProtection;
use TYPO3\CMS\Core\Http\JsonResponse;
......@@ -940,10 +941,15 @@ class UpgradeController extends AbstractController
// ext_localconf, db and ext_tables must be loaded for the updates :(
$upgradeWizardsService = new UpgradeWizardsService();
$adds = $upgradeWizardsService->getBlockingDatabaseAdds();
$adds = [];
$needsUpdate = false;
if (!empty($adds)) {
try {
$adds = $upgradeWizardsService->getBlockingDatabaseAdds();
if (!empty($adds)) {
$needsUpdate = true;
} catch (StatementException $exception) {
$needsUpdate = true;
return new JsonResponse([
Supports Markdown
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