[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:core-ci <typo3@b13.com> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php 1 addition, 1 deletion...ysext/core/Classes/TypoScript/ExtendedTemplateService.php
- typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php 1 addition, 1 deletion...oScriptTemplateConstantEditorModuleFunctionController.php
Please register or sign in to comment