[BUGFIX] Fix DB error handling in FrontendUserImageUpdateWizard 43/53243/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 17:04:42 +0000 (19:04 +0200)
commitd6061a12afcab710cbd80d2196023beeb9d88749
treede88162fd8ec37ca9f770b1a5a8db4cbbeb537a0
parent3d29a6871a76ecd787901286c20a4af7848f0f89
[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/53243
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/install/Classes/Updates/FrontendUserImageUpdateWizard.php