Skip to content

Commit 1e5b5bc

Browse files
georgringerlolli42
authored andcommitted
[BUGFIX] Initialize request variable if not existing
Always initialize the request variable to avoid errors in conditions. Resolves: #106384 Releases: main, 13.4 Change-Id: I13252c39561f02588f09fcc2eaceb70c1bda56e0 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/88755 Reviewed-by: Christian Rath-Ulrich <christian@rath-ulrich.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Rath-Ulrich <christian@rath-ulrich.de>
1 parent c136ea3 commit 1e5b5bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

typo3/sysext/core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeConditionMatcherVisitor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public function initializeExpressionMatcherWithVariables(array $variables): void
134134
// if not, create an instance from ServerRequestInterface and set it.
135135
if (isset($variables['request']) && !($variables['request'] instanceof RequestWrapper)) {
136136
$variables['request'] = new RequestWrapper($variables['request']);
137+
} elseif (!isset($variables['request'])) {
138+
$variables['request'] = new RequestWrapper(null);
137139
}
138140

139141
// We do not expose pageId, rootLine and fullRootLine to conditions directly.

0 commit comments

Comments
 (0)