Commit 32e8398e authored by catch's avatar catch
Browse files

Issue #1532512 by Liam Morland, xjm: Fixed Ensure empty item-list title h3's are never generated.

parent fd9a2104
......@@ -2097,7 +2097,7 @@ function theme_mark($variables) {
*/
function theme_item_list($variables) {
$items = $variables['items'];
$title = $variables['title'];
$title = (string) $variables['title'];
$type = $variables['type'];
$list_attributes = $variables['attributes'];
......@@ -2158,7 +2158,7 @@ function theme_item_list($variables) {
// Check to see whether the block title exists before adding a header.
// Empty headers are not semantic and present accessibility challenges.
if ($output !== '') {
if (isset($title) && $title !== '') {
if ($title !== '') {
$title = '<h3>' . $title . '</h3>';
}
$output = '<div class="item-list">' . $title . $output . '</div>';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment