[BUGFIX] Fix DB error handling in FrontendUserImageUpdateWizard 30/53130/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Tue, 6 Jun 2017 03:45:19 +0000 (20:45 -0700)
committerFrank Naegler <frank.naegler@typo3.org>
Sat, 17 Jun 2017 16:15:07 +0000 (18:15 +0200)
commit445b001a5fa847824d8370e1d75276c80dfdb229
tree2e76cc97eed43c426a7dd4809abffcb5b7c456cf
parent279acf79fb915d12638c4b2e16219c4ab257730c
[BUGFIX] Fix DB error handling in FrontendUserImageUpdateWizard

The errorCode() method returns a string representation of the error that happened.
Comparing this to an integer value to determine is not reliable. In addition Doctrine
throws Exceptions when database statements fail so this part of the code could not be
reached.
Catch the DBALException, extract the error message and let the re-raised extension
bubble up to show the actual error message to the user.

Change-Id: I042b94329e3d52f9520ded812247ee78a73ea402
Resolves: #79870
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53130
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/install/Classes/Updates/FrontendUserImageUpdateWizard.php