Review main Merged

72111[BUGFIX] Avoid calling preg_split(null) in ContentObjectRenderer

Stefan Bürk CR +2 V +2 Easy +5 −1 updated 11/10/21, 09:55

Commit message

CropViewHelper::renderStatic() calls ContentObjectRenderer::cropHTML()
with result from children closure, which may be null. Feeding null to
preg_split(null) emits a E_DEPRECATED PHP 8.1 error.

This patch casts the value to string in the ViewHelper, but also add a
string sanitize to the cropHTML() method to avoid this the E_DEPRECATED
error. Added @todo to add strict types to the signature in v12.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Wouter Wolters +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 68

  1. Stefan Bürk uploaded patch set 1 11/10/21, 07:11

  2. core-ci voted on patch set 1 V +1 11/10/21, 07:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19098

  3. Christian Kuhn updated the commit message in patch set 2 11/10/21, 09:26

  4. Christian Kuhn voted on patch set 2 V +1 CR +1 11/10/21, 09:27

  5. Wouter Wolters voted on patch set 2 V +1 CR +1 11/10/21, 09:48

  6. core-ci voted on patch set 2 V +1 11/10/21, 09:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19117

  7. Christian Kuhn voted on patch set 2 V +2 CR +2 11/10/21, 09:55

  8. Christian Kuhn merged patch set 3 11/10/21, 09:55