Skip to content

Commit

Permalink
[BUGFIX] Fix undefined array key in TemplateService
Browse files Browse the repository at this point in the history
If a TypoScript sub-template is missing, because it is disabled,
it is necessary to check for the existence.

Resolves: #97601
Releases: main, 11.5
Change-Id: Iaca27df294f4c3c3ea890defc4ccd3b5b6feb671
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74598
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
  • Loading branch information
vaxul authored and o-ba committed May 10, 2022
1 parent cd59f1c commit 87feed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/TypoScript/TemplateService.php
Expand Up @@ -652,7 +652,7 @@ public function processTemplate($row, $idList, $pid, $templateID = '', $template
}
// Traversing list again to ensure the sorting of the templates
foreach ($basedOnIds as $id) {
if (is_array($subTemplates[$id])) {
if (is_array($subTemplates[$id] ?? false)) {
$this->versionOL($subTemplates[$id]);
$this->processTemplate($subTemplates[$id], $idList . ',sys_' . $id, $pid, 'sys_' . $id, $templateID);
}
Expand Down

0 comments on commit 87feed9

Please sign in to comment.