From 61bb768be84a061057df419aedd14e04df0f4f56 Mon Sep 17 00:00:00 2001 From: Morton Jonuschat <m.jonuschat@mojocode.de> Date: Sat, 8 Apr 2017 15:04:12 -0700 Subject: [PATCH] [BUGFIX] Catch SQL Errors in SysRefindexHashUpdater Show the actual SQL error message to the user when an error occurs while executing the update statements in the SysRefindexHashUpdater instead of rethrowing the exception. Change-Id: Ic3ca404438c221db6eecc5c912dcd416d2be6cde Resolves: #80734 Releases: master, 8.7 Reviewed-on: https://review.typo3.org/52399 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Christer V <cvi@systime.dk> Reviewed-by: Marcus Schwemer <ms@schwemer.de> Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de> Reviewed-by: Joerg Boesche <typo3@joergboesche.de> Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Wouter Wolters <typo3@wouterwolters.nl> --- .../sysext/install/Classes/Updates/SysRefindexHashUpdater.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/install/Classes/Updates/SysRefindexHashUpdater.php b/typo3/sysext/install/Classes/Updates/SysRefindexHashUpdater.php index a1930e397a83..0e70b9d76290 100644 --- a/typo3/sysext/install/Classes/Updates/SysRefindexHashUpdater.php +++ b/typo3/sysext/install/Classes/Updates/SysRefindexHashUpdater.php @@ -136,8 +136,9 @@ class SysRefindexHashUpdater extends AbstractUpdate $connection->commit(); $this->markWizardAsDone(); } catch (DBALException $e) { + $customMessage = 'SQL-ERROR: ' . htmlspecialchars($e->getPrevious()->getMessage()); $connection->rollBack(); - throw $e; + return false; } return true; -- GitLab