Skip to content
Snippets Groups Projects
Commit 2cac5a36 authored by Morton Jonuschat's avatar Morton Jonuschat Committed by Markus Klein
Browse files

[BUGFIX] Fix functional tests for EXT:workspaces on PostgreSQL

Detect errors during execution of SQL statements using the
exceptions thrown by Doctrine DBAL instead of trying to use
Connection::errorCode().

The previous code doesn't work on MySQL if an actual error
occurs since an exception would be thrown earlier in the
process and the relevant code path would not be reached.

The happy path worked before because MySQL returns 0 as the
code when a statement executed successfully while PostgreSQL
returns '00000' which PHP does not consider to be empty.

Resolves: #79801
Releases: master
Change-Id: I508966b6731d256d1edff2267669d158a8d647bf
Reviewed-on: https://review.typo3.org/51731


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent 0e0b7189
Branches
Tags
No related merge requests found
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