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 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 912

  1. Christian Kuhn uploaded patch set 1 10/25/21, 18:58

  2. Christian Kuhn voted on patch set 1 CR -1 10/25/21, 19:00

  3. Christian Kuhn uploaded patch set 2 10/25/21, 19:07

  4. core-ci voted on patch set 1 V +1 10/25/21, 19:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18554

  5. core-ci voted on patch set 2 V +1 10/25/21, 19:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18555

  6. Benni Mack voted on patch set 2 V +1 CR +1 10/25/21, 19:21

  7. Benni Mack updated the commit message in patch set 3 10/25/21, 19:22

  8. Benni Mack voted on patch set 3 V +1 CR +1 10/25/21, 19:23

  9. core-ci voted on patch set 3 V +1 10/25/21, 19:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18557

  10. Stefan Bürk voted on patch set 3 V +1 CR +1 10/25/21, 20:15

  11. Christian Kuhn voted on patch set 3 V +2 CR +2 10/25/21, 20:19

  12. Christian Kuhn merged patch set 4 10/25/21, 20:19