- Issue created by @pfrenssen
- @pfrenssen opened merge request.
I am getting the following error which seems to originate from an incompatibility with the Client-side Hierarchical Select → module, but can happen also with other modules that might alter forms.
Warning: Undefined array key 1 in ./modules/contrib/menu_link_weight/menu_link_weight.node.inc on line 210
We are making the assumption that under all possible circumstances if a form contains the $form['menu']['link']['menu_parent']
sequence of keys that this is contains the data put there by the core Menu module and has not been altered by other modules. It is not guaranteed that the value of this form element is always as expected.
The error occurs because we are splitting the form element value on the ":" character without checking that this character is present.
Put in a simple check if the value contains ":" before continuing. A similar fix has already been applied to menu_link_weight_node_element_process()
. We need this fix also in menu_link_weight_node_form_validate()
.
Active
1.0
Code