Should use array for class attribute, not string

Created on 8 March 2023, over 1 year ago
Updated 10 March 2023, over 1 year ago

Problem/Motivation

Came here from a bug in gin_lb:

Error: [] operator not supported for strings in gin_lb_preprocess_form_element() (Line 26 in /web/modules/contrib/gin_lb/gin_lb.module)

where the affected line is:

$variables['attributes']['class'][] = 'form-type--' . $variables['element']['#type'];

Looing for the reason, why class is a string and not an array, I think it's caused by DROWL Layouts!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024