Review main Merged

71972[BUGFIX] Avoid trim(null) in ContentObjectRenderer->stdWrap_*()

Christian Kuhn CR +2 V +2 Easy +3 −3 updated 10/25/21, 20:19

Commit message

Calling trim() with something else than a string
emits a E_DEPRECATED error with PHP 8.1.
Some ContentObjectRenderer->stdWrap_*() are affected
by this and sanitized with explicit string casts.

This is a bit of an artificial thing that mostly
only happens in tests since in TypoScript usually
everything is a string anyways. However, depending
on how stdWrap_* methods are fed and used code-wise, it
could also be a db return, which might be int or null.
We thus can't simply change the method signature to
'string $content' and need to go with casts instead.

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 1

Files 1