[BUGFIX] Revert behaviour of stdWrap ifEmpty
The stdWrap function ifEmpty must return true if a PHP falsy value is given. That means e.g. an empty string or a "0". To make it more clear that stdWrap ifEmpty in fact uses the logic of the PHP function "empty", this function is now used. First, the value is trimmed, which means a string is returned, and then this value is passed to the empty function. As this works now properly, the getCurrentValue method needed a check against empty array keys. The stdWrap_current method now uses the getCurrentValue method as they both do the exact same thing. Resolves: #90908 Releases: main, 11.5 Change-Id: I3268fbaf68a2c56ae33ae499ad671e0a89fa7867 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73081 Tested-by:core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 4 additions, 4 deletions.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php 41 additions, 0 deletions...nd/Tests/Unit/ContentObject/ContentObjectRendererTest.php
Please register or sign in to comment