ModulesUninstallForm.php assigns string value to ['attributes']['class']

Created on 24 March 2025, about 2 months ago

Problem/Motivation

ModulesUninstallForm.php assigns string value to ['attributes']['class'] which can cause complication since in most cases Array is expected.

In our case, hook_link_alter() was used in custom module to target links with specific class values and additional classes were appended to them. As soon as we upgraded to 9.4, an error was thrown on visiting admin/modules which was complaining about [] operator not supported for strings.

Of course we could change our custom code, but I believe, in principal, ['attributes']['class'] should be an array, since class often holds multiple values.

Proposed resolution

We can simply put the value in [].

Remaining tasks

Write tests

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component

forms system

Created by

🇮🇳India Sivaji_Ganesh_Jojodae Chennai

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024