Problem/Motivation

The code in bootstrap_preprocess_form_element() doesn't consider the case where $variables['element']['#label_attributes'] is not available and produces notices:

Notice: Undefined index: #label_attributes in bootstrap_preprocess_form_element() (line 66 of themes/bootstrap/templates/system/form-element.vars.php).

Proposed resolution

Add condition that checks whether the label attributes are actually available.

CommentFileSizeAuthor
#1 label-attributes-check-2545354-1.patch810 bytess_leu

Comments

s_leu’s picture

Status: Active » Needs review
StatusFileSize
new810 bytes

Here's a simple patch that fixes the notices.

neardark’s picture

Status: Needs review » Fixed

Merged.

  • neardark committed e27b910 on 8.x-3.x authored by s_leu
    Issue #2545354 by s_leu: #label_attributes is not always available
    

Status: Fixed » Closed (fixed)

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