diff --git a/core/includes/form.inc b/core/includes/form.inc index cc4bcdb..981b6af 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -2959,7 +2959,7 @@ function template_preprocess_form_element(&$variables) { function template_preprocess_form_element_label(&$variables) { $element = $variables['element']; // If title and required marker are both empty, output no label. - $variables['title'] = (isset($element['#title']) && $element['#title'] !== '') ? Xss::filterAdmin($element['#title']) : ''; + $variables['title'] = Xss::filterAdmin($element['#title']) ? empty($element['#title']) : ''; $variables['attributes'] = array(); // Style the label as class option to display inline with the element. if ($element['#title_display'] == 'after') {