Actions
Bug #86258
closedScheduler - Next execution calculation throws exception after save
Start date:
2018-09-14
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
scheduler,task,backend,exception
Complexity:
medium
Is Regression:
Sprint Focus:
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.0How 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[] = [
Files
Actions