Unverified Commit 469425a4 authored by larowlan's avatar larowlan
Browse files

Issue #3241300 by alexpott: template_preprocess_responsive_image_formatter()...

Issue #3241300 by alexpott: template_preprocess_responsive_image_formatter() causes deprecations on PHP 8.1
parent 93e9e36c
...@@ -106,7 +106,7 @@ function template_preprocess_responsive_image_formatter(&$variables) { ...@@ -106,7 +106,7 @@ function template_preprocess_responsive_image_formatter(&$variables) {
$item = $variables['item']; $item = $variables['item'];
$attributes = []; $attributes = [];
// Do not output an empty 'title' attribute. // Do not output an empty 'title' attribute.
if (mb_strlen($item->title) != 0) { if (!is_null($item->title) && mb_strlen($item->title) != 0) {
$attributes['title'] = $item->title; $attributes['title'] = $item->title;
} }
$attributes['alt'] = $item->alt; $attributes['alt'] = $item->alt;
......
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