[BUGFIX] Let stdWrap return null again
This is a partial revert for #96354. In order to prevent PHP 8.1 warnings when using built-in functions like "trim" with null values, the stdWrap function and stdWrap_field were changed to always return a string. This, however, led to other parts of the TypoScript functions to not work properly anymore, because some relied on stdWrap to return null. One of them are "if.isNull". A functional test is added to verify the regression. The original issue with the PHP 8.1 warnings must be solved differently. Every stdWrap result has to be casted to a string, where this is expected. This has been done for every occurrence, which phpstan has found. Resolves: #96571 Related: #96354 Releases: main, 11.5 Change-Id: I9b1f2f5f75e83d58261f74469c9fb8ab24b5d9c2 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73140 Tested-by:Benjamin Franzke <bfr@qbus.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 11 additions, 11 deletions.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php 2 additions, 2 deletions...tend/Classes/ContentObject/Menu/TextMenuContentObject.php
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php 33 additions, 0 deletions...ts/Functional/ContentObject/ContentObjectRendererTest.php
Please register or sign in to comment