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

    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 2