- Issue created by @timcosgrove
redirect_options includes a form_alter hook which looks for specific classes on the form object in order to decide whether to make changes.
The check for the specific classes assumes that the property holding the classes ($form['#attributes']['class']
) is an array. However, this isn't always the case. For example, this core form explicitly sets a string for that value: https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/lan...
Visiting that form with redirect_options enabled causes a fatal error.
1. Set up a fresh Drupal install (10.x or 9.x), and add redirect_options.
2. Enable redirect_options as well as the language module.
3. Visit the path /admin/config/regional/content-language
You will get an error.
The current module checks for a class to determine if it should modify the form, but it is easier to specify the forms to be modified directly. This also would allow us to guarantee the structure that is being checked.
Attach patch.
Active
2.0
Code