Review 11.5 Merged

73140[BUGFIX] Let stdWrap return null again

Benjamin Franzke CR +2 V +2 Normal +46 −13 updated 01/24/22, 17:06

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 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 2

Files 3

Review log 23

  1. Benjamin Franzke uploaded patch set 1 01/24/22, 16:39

  2. core-ci voted on patch set 1 V +1 01/24/22, 16:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22474

  3. Benjamin Franzke merged patch set 2 01/24/22, 17:06