Skip to content
Snippets Groups Projects
Commit f218f10c authored by git's avatar git Committed by Alberto Siles
Browse files

Issue #2892364 by brandonratz, Pawelgorski87: Undefined index in...

Issue #2892364 by brandonratz, Pawelgorski87: Undefined index in bootstrap_barrio_preprocess_form_element
parent 105c31df
No related branches found
No related tags found
No related merge requests found
......@@ -310,13 +310,18 @@ function bootstrap_barrio_preprocess_block(&$variables) {
}
function bootstrap_barrio_preprocess_form_element(&$variables) {
if ( is_object($variables['label']['#title']) ) {
$variables['input_title'] = $variables['label']['#title']->render();
if (!isset($variables['label']['#title'])) {
$variables['input_title'] = NULL;
}
elseif ( is_object($variables['label']['#title']) ) {
$variables['input_title'] = $variables['label']['#title'];
}
else {
$variables['input_title'] = $variables['label']['#title'];
}
$variables['input_attributes'] = new Attribute($variables['element']['#attributes']);
if (isset($variables['element']['#attributes'])) {
$variables['input_attributes'] = new Attribute($variables['element']['#attributes']);
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment