PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar rish106-hub
rish106-hub
16 Jun 2026

Pull Request resolves #47944.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

When a scheduled task crashes on first run, DB row has locked IS NOT NULL but last_execution = NULL. The Scheduled Tasks admin list crashes with:

DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated

Root cause: last_execution passed directly to HTMLHelper::_('date', ...) without null guard inside the $item->locked block. Lines 251 and 256 in the same file already use the correct ternary guard pattern — this block was missing it.

Fix: extract formatted date into $lockedSince with the same ternary guard used on line 251.

Testing Instructions

  1. Create a scheduled task
  2. Set last_execution = NULL and locked = NOW() in #__scheduler_tasks for that task
  3. Navigate to System → Scheduled Tasks
  4. Before: page crashes with deprecation fatal
  5. After: page renders; locked task shows - in tooltip

Actual result BEFORE applying this PR

Fatal deprecation crash — Scheduled Tasks page inaccessible

Expected result AFTER applying this PR

Page renders normally; locked tasks with no prior execution show - in the running-since tooltip

  • No documentation changes for guide.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar rish106-hub rish106-hub - open - 16 Jun 2026
avatar rish106-hub rish106-hub - change - 16 Jun 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jun 2026
Category Administration
avatar rish106-hub
rish106-hub - comment - 16 Jun 2026

Closing as duplicate of #47951 which addresses the same issue.

avatar rish106-hub rish106-hub - change - 16 Jun 2026
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2026-06-16 15:28:10
Closed_By rish106-hub
Labels Added: PR-5.4-dev
avatar rish106-hub rish106-hub - close - 16 Jun 2026

Add a Comment

Login with GitHub to post a comment