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

[BUGFIX] Avoid calling explode(null) in ExtendedTemplateService

ExtendedTemplateService::ext_regObjectPositions() calls explode() with
$constants parameter which may be null. Feeding null to explode(null)
emits a E_DEPRECATED PHP 8.1 error.

ext_regObjectPositions() gets called from method initialize_editor() in
TypoScriptTemplateConstantEditorModuleFunctionController and may feed
null as constants argument instead of string value.

This patch sanitizes that in initialize_editor() with a type cast.
ExtendedTemplateService is marked as @internal, and as there is only
one call to ext_regObjectPositions() in the core this patch changes
signature of ext_regObjectPositions() to strict types.

Resolves: #95935
Releases: master
Change-Id: I41cd70782163141482600eb439a47c894b5c965f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72132


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
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 1394a4cf
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