No Code Attached Yet bug
avatar brbrbr
brbrbr
16 Oct 2024

Steps to reproduce the issue

Disable the SEF plugin and enable maximum login

Expected result

No warnings

Actual result

Warning: Attempt to read property "params" on array in [ROOT]libraries/src/Component/Router/Rules/MenuRules.php

System information (as much as possible)

Joomla 5.2

Additional comments

PluginHelper::getPlugin should probably return an empty object for $plugin !== null

avatar brbrbr brbrbr - open - 16 Oct 2024
avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Oct 2024
avatar Fedik Fedik - change - 16 Oct 2024
Labels Added: bug
avatar Fedik Fedik - labeled - 16 Oct 2024
avatar Fedik
Fedik - comment - 16 Oct 2024

As result of:

avatar Hackwar
Hackwar - comment - 16 Oct 2024

What does #42989 have to do with this?

Yes, the method sucks and eventually we should replace this with 2 methods instead of just one, but the behavior is correct. PluginHelper::getPlugin() states that it either returns an object or an array of objects. We can keep this ticket open to create another method PluginHelper::getPlugins() to solve this.

avatar Hackwar Hackwar - change - 16 Oct 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-10-16 16:22:40
Closed_By Hackwar
avatar Hackwar Hackwar - close - 16 Oct 2024
avatar Hackwar
Hackwar - comment - 16 Oct 2024

Ok, I understand what one has to do with the other. I'll create a PR to fix that. In the meantime I created #44282 to introduce a new method for retrieving a list of plugins. Thanks for reporting this.

Add a Comment

Login with GitHub to post a comment