[BUGFIX] Ensure getRecordTitle returns a string
BackendUtility::getRecordTitle() should return a string (as the return type annotation suggest). Especially because the return value is usually directly passed to htmlspecialchars(), which again requires a string to be given. Since BackendUtility::getRecordTitle() was missing some typecasts, it was possible that e.g. an integer was returned. This then failed in classes, defining strict mode. An example for such scenario: Having a table, which defines the `uid` as `label` field. getRecordTitle is using getProcessedValue(), which has a guard clause to directly return the input value, in case the label field is `uid`. This would then usually (depending on DBMS) return an integer. This is now fixed by applying type casts to the relevant places. Resolves: #94726 Releases: master Change-Id: Ie02837ff5e55f369ff8ddf1f3e5098e636f475bb Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70243 Tested-by:core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Jochen <rothjochen@gmail.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Jörg Bösche <typo3@joergboesche.de> Reviewed-by:
Jochen <rothjochen@gmail.com> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
Please register or sign in to comment