Skip to content
Snippets Groups Projects
Commit d6782a1d authored by Stefan Bürk's avatar Stefan Bürk Committed by Oliver Bartsch
Browse files

[BUGFIX] Avoid unreliable 'rowCount()' in RedirectRepository

rowCount() on result sets for SELECT queries are not reliable
across all dbmns, which doctrine/dbal comments in the docblock.
See: https://github.com/doctrine/dbal/blob/110ab1387f11ca08dd510850d1f45bc6e79c74bb/src/Driver/Result.php#L77

Because of "rowCount()"'s unreliable behaviour for some dbms like
sqlite, this should be avoided to ensure cross dbms support.

This patch mitigate this with a simple COUNT() query replacement
in '\TYPO3\CMS\Redirects\Repository\RedirectRepository' for the
"ext:redirects", as this can be done without greater API changes.

Other occurrences will be mitigated with dedicated patches and the
proper suitable solution for the corresponding case.

Resolves: #97455
Releases: main, 11.5
Change-Id: Ifbbe6e35e1854483d6102657d71f3b74e822dcf5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74309


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 032461e7
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