Unverified Commit 15e1c658 authored by larowlan's avatar larowlan
Browse files

Issue #3240906 by andypost, alexpott, mondrake:...

Issue #3240906 by andypost, alexpott, mondrake: template_preprocess_image_formatter() triggers deprecations in PHP 8.1
parent cb32dca7
......@@ -58,7 +58,7 @@ function template_preprocess_image_formatter(&$variables) {
$item = $variables['item'];
// Do not output an empty 'title' attribute.
if (mb_strlen($item->title) != 0) {
if (!is_null($item->title) && mb_strlen($item->title) != 0) {
$variables['image']['#title'] = $item->title;
}
......
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