User tests: Successful: Unsuccessful:
Pull Request resolves #47944
The "Running since" tooltip ( in Scheduled Tasks page) for a locked task was incorrectly attempting to format $item->last_execution instead of $item->locked. Because a task crashing on its first run has a NULL value for last_execution, passing it to the date formatter caused PHP to crash.
This PR swaps $item->last_execution with $item->locked which logically represents the start time of the current run and is guaranteed to not be NULL within that code block.
#__scheduler_tasks table.locked column to a valid datetime and ensure last_execution remains NULL.The Scheduled Tasks list fails to load properly and displays an uncaught error message.
The Scheduled Tasks list loads properly. The stuck task correctly displays the 'running man' icon, and hovering over it displays the accurate tooltip
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration |
went with this approach over adding a NULL check on item->last_execution as doing so would avoid the fatal error but would still display the wrong value for the Running Since tooltip ( it would display 'Running Since -') as last_exection would be NULL, while item->locked is guranteed to be not NULL.
the same shouldn't be done here
the same shouldn't be done here
?
@alikon you're right, i just tested and there is a similar bug ( that this PR is trying to fix in schedules tasks list) in the execution history page of scheduled tasks. And it happens for all tasks that are manually trigerred.

same similar change can be made to fix it ( added a NULL check before the function call ).
should that be done in this PR, or should i make a new one?
| Labels |
Added:
PR-5.4-dev
|
||
went with the simpler approach for now
went with this approach over adding a NULL check on item->last_execution as doing so would avoid the fatal error but would still display the wrong value for the Running Since tooltip.