Skip to content
Snippets Groups Projects
Commit 10d1fc78 authored by Helmut Hummel's avatar Helmut Hummel Committed by Christian Kuhn
Browse files

[BUGFIX] Fix array access warning in SystemStatusUpdateTask

When this task is executed on CLI (scheduler), the global request variable
is not available, thus a null check must be added before checking the instance
of the value.

Releases: 10.4, 11.5, main
Resolves: #99464
Change-Id: Ie9c1b8e4fbc187d6ade569b1b152ce799a09a1f0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77221


Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
parent 3cd5b10d
Branches
Tags
No related merge requests found
......@@ -125,7 +125,7 @@ class SystemStatusUpdateTask extends AbstractTask
->subject($subject)
->setTemplate('Report')
->assign('message', $message);
if ($GLOBALS['TYPO3_REQUEST'] instanceof ServerRequestInterface) {
if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
$email->setRequest($GLOBALS['TYPO3_REQUEST']);
}
......
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