No Code Attached Yet bug
avatar billtomczak
billtomczak
17 Feb 2022

Steps to reproduce the issue

  1. Install a component that has an administrator submenu link that uses an array url parameter. e.g.
<submenu>
    <menu link="option=com_plugins&amp;filter[folder]=system">System Plugins</menu>
</submenu>
  1. Create a custom administrator menu
  2. Click to add a new menu item on it

Expected result

No errors.
Ability to create a menu item using the submenu described above.

Actual result

The following error is seen:
Warning: strlen() expects parameter 1 to be string, array given in /home/181198.cloudwaysapps.com/njjxbtxwqr/public_html/administrator/components/com_menus/src/Model/MenutypesModel.php on line 458

Although a menu item can be created using the above mentioned submenu, the array url variable is removed and the link used is incorrect

System information (as much as possible)

Joomla v4.1.0
php v7.4.27
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36

Additional comments

avatar billtomczak billtomczak - open - 17 Feb 2022
avatar billtomczak billtomczak - change - 17 Feb 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 17 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Feb 2022
avatar Fedik
Fedik - comment - 19 Feb 2022

Seems valid bug, parse_str will return multidimensional array, and then array_filter($request, 'strlen'); shows warning.

if ((string) $attributes->link)
{
parse_str((string) $attributes->link, $request);
}

$o->request = array_filter($request, 'strlen');

avatar Fedik Fedik - change - 19 Feb 2022
Labels Added: bug
avatar Fedik Fedik - labeled - 19 Feb 2022

Add a Comment

Login with GitHub to post a comment