fix(quickicon): never let the dashboard widget crash the admin page #298

Merged
jmiller merged 2 commits from fix/quickicon-harden into dev 2026-07-16 18:09:12 +00:00
Owner

Closes #297. Hardens plg_quickicon_mokosuitebackup so a DB error or malformed icon can never bubble into a mod_quickicon array_merge crash on the admin dashboard: the query/state logic is extracted to buildStatusIcon() and wrapped in try/catch (log + contribute nothing on failure). The current handler is already structurally correct (icons wrapped in a list, matching core joomlaupdate) per the analysis in #297; this is the defensive guard.

https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i

Closes #297. Hardens plg_quickicon_mokosuitebackup so a DB error or malformed icon can never bubble into a mod_quickicon array_merge crash on the admin dashboard: the query/state logic is extracted to buildStatusIcon() and wrapped in try/catch (log + contribute nothing on failure). The current handler is already structurally correct (icons wrapped in a list, matching core joomlaupdate) per the analysis in #297; this is the defensive guard. https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 1 commit 2026-07-16 18:08:48 +00:00
fix(quickicon): never let the dashboard widget crash the admin page (#297)
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Generic: Project CI / Lint & Validate (pull_request) Successful in 11s
Universal: PR Check / Validate PR (pull_request) Failing after 9s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 8s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 23s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
7e58ca7598
The mod_quickicon helper array_merge()s a defaults array into each icon a
plugin returns; if a plugin's DB query throws or it returns a malformed
(unwrapped) icon, the whole admin dashboard can 500 with an array_merge
TypeError. The current handler is structurally correct (icons are wrapped
in a list, matching core plg_quickicon_joomlaupdate), so this hardens it:

- Extract the query/state logic into buildStatusIcon().
- Wrap it in try/catch — on any Throwable, log and contribute no icon
  instead of bubbling into the dashboard render.
- Document why the [$icon] list-wrapping is load-bearing.

Closes #297.

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller force-pushed fix/quickicon-harden from ba124577ec to 7e58ca7598 2026-07-16 18:08:48 +00:00 Compare
jmiller added 1 commit 2026-07-16 18:09:05 +00:00
chore(version): pre-release bump to 02.64.12-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
747e50bf62
jmiller merged commit b1b81fd107 into dev 2026-07-16 18:09:12 +00:00
jmiller deleted branch fix/quickicon-harden 2026-07-16 18:09:13 +00:00
Sign in to join this conversation.