Hi Mitesh,

I am getting following notice:
Notice: Undefined index: class in menu_link_modal_set_attributes() (line 113 of modules/contrib/menu_link_modal/menu_link_modal.module).

Comments

NarendraR created an issue. See original summary.

narendrar’s picture

StatusFileSize
new13.58 KB
solide-echt’s picture

StatusFileSize
new733 bytes

Attached is a patch that, at least in my case, fixed the problem. The ternary operator produces an empty array if the menu item has no classes yet (which I believe is true unless some other module adds classes too); I've added a check to manually add the ['class'] array.

miteshmap’s picture

StatusFileSize
new896 bytes

Define class attributes as array if it's not set.

  • miteshmap committed ee1374f on 8.x-1.x
    Issue #2912358 by solide-echt, miteshmap, NarendraR: Undefined index...
miteshmap’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

dj12djdjs’s picture

Version: 8.x-1.2 » 8.x-1.3

It appears that I get this notice as well:
Notice: Undefined index: class in menu_link_modal_set_attributes() (line 104 in /modules/menu_link_modal/menu_link_modal.module)

dj12djdjs’s picture

This issue was fixed with the latest update.