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

Issues 2

Files 3

Review log 69

  1. Nikita Hovratov uploaded patch set 1 01/22/22, 18:44

  2. core-ci voted on patch set 1 V -1 01/22/22, 18:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22407

  3. Nikita Hovratov uploaded patch set 2 01/22/22, 19:00

  4. Nikita Hovratov uploaded patch set 3 01/22/22, 19:09

  5. core-ci voted on patch set 2 V -1 01/22/22, 19:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22408

  6. core-ci voted on patch set 3 V +1 01/22/22, 19:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22409

  7. Benni Mack voted on patch set 3 V +1 CR +1 01/24/22, 13:02

  8. Benjamin Franzke voted on patch set 3 V +2 CR +2 01/24/22, 16:39

  9. Benjamin Franzke merged patch set 4 01/24/22, 16:39