User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Extensions can use the ListView class without defining a filter form. In this case, the $filterForm property remains null, which can lead to a fatal error when the view attempts to access it without a null check.
This PR adds a guard check to safely handle the absence of a filter form and prevent a fatal error.
You got fatal error Call to a member function addControlField() on null due to missing null check in ListView class
No error anymore. You see a screen displays list of items (empty until you add items to it). You might see a warning Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in but ignore it for now. The main thing is fatal error is sorted by this PR.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
@richard67 It is a bug fix for 6.0-dev branch only. The issue was introduced by my PR for 6.0-dev #46165
I have tested this item ✅ successfully on adb8c1b
I have tested this item ✅ successfully on adb8c1b
| Status | Pending | ⇒ | Ready to Commit |
rtc
| Labels |
Added:
RTC
bug
PR-6.0-dev
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-25 11:48:52 |
| Closed_By | ⇒ | Bodge-IT |
Thanks @joomdonation for fixing, thanks @ceford & @Fedik for tests
@joomdonation As this PR is made for the 6.0-dev branch: Is this a bug fix specific for 6.x? or does the issue which it fixes also exist in 5.4-dev? In this case the PR should be made for the 5.4-dev branch. Or if it counts as a new feature, then for the 6.1-dev branch. See https://github.com/joomla/joomla-cms?tab=readme-ov-file#which-branch-should-my-pull-request-target .