Skip to content
Snippets Groups Projects
Commit 93f2e05c authored by Stefan Bürk's avatar Stefan Bürk Committed by Christian Kuhn
Browse files

[BUGFIX] Avoid calling preg_split(null) in ContentObjectRenderer

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.

Resolves: #95934
Releases: master
Change-Id: I2882163bda9bab9012241f11daf65a0a3191041d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72111


Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 5f69e379
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment