Skip to content
Snippets Groups Projects
Commit 0b9d7915 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Benjamin Franzke
Browse files

[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: default avatarBenjamin Franzke <bfr@qbus.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
parent 7055e874
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