#86258Scheduler - Next execution calculation throws exception after save
Description
When creating a new task in den scheduler module and save them an exception with “date() expects parameter 2 to be integer, string given” throws.
*TYPO3 v9.4.0*How to reproduce:
- Open scheduler module in the backend
- Create new task
- Select any type of task (extbase, console command, …)
- Add a frequency (e.g. 3600 or * */1 * * *)
- Click on “Save” and “Close” Button
- After saving and rendering the scheduler task overview the error occurs
Affected line in SchedulerModuleController
$nextDate = date($dateFormat, $schedulerRecord['nextexecution']);
TypeError
date() expects parameter 2 to be integer, string given
in SchedulerModuleController.php line 953
// Also hide the date if task is disabled (the information doesn't make sense, as it will not run anyway)
if ($isRunning || $schedulerRecord['disable']) {
$nextDate = '-';
} else {
$nextDate = date($dateFormat, $schedulerRecord['nextexecution']);
if (empty($schedulerRecord['nextexecution'])) {
$nextDate = $this->getLanguageService()->getLL('none');
} elseif ($schedulerRecord['nextexecution'] < $GLOBALS['EXEC_TIME']) {
$labels[] = [Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.