[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:Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php 1 addition, 1 deletion...ysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 4 additions, 0 deletions.../frontend/Classes/ContentObject/ContentObjectRenderer.php
Please register or sign in to comment