Commit 48d5c96b authored by Christian Kuhn's avatar Christian Kuhn Committed by Oliver Bartsch
Browse files

[BUGFIX] Avoid PHP 8 warnings in ext:scheduler

Scheduler backend module -> Add button -> add some valid
information that makes the form save correctly -> "Save
and new" from docheader save drop down -> boom.

Resolves: #96506
Releases: main, 11.5
Change-Id: I8eacf1f5f958605f3505761a64902a71bcc0c7dd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72963

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent f79a3299
......@@ -545,7 +545,7 @@ class SchedulerModuleController
$task = null;
$process = 'edit';
if ($this->submittedData['uid'] > 0) {
if (($this->submittedData['uid'] ?? 0) > 0) {
// If editing, retrieve data for existing task
try {
$taskRecord = $this->scheduler->fetchTaskRecord($this->submittedData['uid']);
......@@ -644,7 +644,7 @@ class SchedulerModuleController
$this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Scheduler/Scheduler');
// Start rendering the add/edit form
$this->view->assign('uid', htmlspecialchars((string)$this->submittedData['uid']));
$this->view->assign('uid', htmlspecialchars((string)($this->submittedData['uid'] ?? '')));
$this->view->assign('cmd', htmlspecialchars((string)$this->getCurrentAction()));
$this->view->assign('csh', $this->cshKey);
$this->view->assign('lang', 'LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:');
......@@ -657,7 +657,7 @@ class SchedulerModuleController
// Task class selector
// On editing, don't allow changing of the task class, unless it was not valid
if ($this->submittedData['uid'] > 0 && !empty($taskInfo['class'])) {
if (($this->submittedData['uid'] ?? 0) > 0 && !empty($taskInfo['class'])) {
$this->view->assign('task_class', $taskInfo['class']);
$this->view->assign('task_class_title', $registeredClasses[$taskInfo['class']]['title']);
$this->view->assign('task_class_extension', $registeredClasses[$taskInfo['class']]['extension']);
......
Markdown is supported
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