[BUGFIX] Avoid trim(null) in ContentObjectRenderer->stdWrap_*()
Calling trim() with something else than a string emits a E_DEPRECATED error with PHP 8.1. Some ContentObjectRenderer->stdWrap_*() are affected by this and sanitized with explicit string casts. This is a bit of an artificial thing that mostly only happens in tests since in TypoScript usually everything is a string anyways. However, depending on how stdWrap_* methods are fed and used code-wise, it could also be a db return, which might be int or null. We thus can't simply change the method signature to 'string $content' and need to go with casts instead. Resolves: #95774 Releases: master Change-Id: Ifbb90170c4561e1570444c0c3d818aa32e58c827 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71972 Tested-by:Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Please register or sign in to comment