Problem/Motivation

When a form submit button has no class attributes array bs_base is showing a warning:

Warning: in_array() expects parameter 2 to be array, null given in bs_base_form_alter() (line 36 of themes/contrib/bs_base/bs_base.theme).

Notice: Undefined index: class in bs_base_form_alter() (line 36 of themes/contrib/bs_base/bs_base.theme).

Proposed resolution

Check whether class attributes array exists and if not set button--primary class.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Status: Active » Needs review
StatusFileSize
new711 bytes

Fixing it in the attached patch.

mbovan’s picture

Noticed a wrong class name in the second if condition. Quickly fixing that as well.

  • pivica committed 51a8049 on 8.x-1.x authored by mbovan
    Issue #3011050 by mbovan: Undefined index: class in bs_base_form_alter()
    
pivica’s picture

Thx, committed.

pivica’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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