Review main Merged

72132[BUGFIX] Avoid calling explode(null) in ExtendedTemplateService

Stefan Bürk CR +2 V +2 Easy +2 −2 updated 11/10/21, 09:55

Commit message

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.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Wouter Wolters +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 68

  1. Stefan Bürk uploaded patch set 1 11/10/21, 07:12

  2. core-ci voted on patch set 1 V +1 11/10/21, 07:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19099

  3. Christian Kuhn updated the commit message in patch set 2 11/10/21, 09:25

  4. Christian Kuhn voted on patch set 2 V +1 CR +1 11/10/21, 09:25

  5. core-ci voted on patch set 2 V +1 11/10/21, 09:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19115

  6. Wouter Wolters voted on patch set 2 V +1 CR +1 11/10/21, 09:47

  7. Christian Kuhn voted on patch set 2 V +2 CR +2 11/10/21, 09:55

  8. Christian Kuhn merged patch set 3 11/10/21, 09:55