Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • typo3 typo3
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Insights
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • typo3typo3
  • typo3typo3
  • Repository
Switch branch/tag
  • typo3
  • typo3
  • sysext
  • frontend
  • Classes
  • ContentObject
  • ContentObjectRenderer.php
Find file BlameHistoryPermalink
  • Stefan Bürk's avatar
    [BUGFIX] Avoid calling preg_split(null) in ContentObjectRenderer · 93f2e05c
    Stefan Bürk authored Nov 10, 2021 and Christian Kuhn's avatar Christian Kuhn committed Nov 10, 2021
    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's avatarWouter Wolters <typo3@wouterwolters.nl>
    Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
    Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
    Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    93f2e05c