Review main Merged

73128[BUGFIX] Let stdWrap return null again

Nikita Hovratov CR +2 V +2 Normal +46 −13 updated 01/24/22, 16:39

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 3