Unverified Commit 15e1c658 authored by Lee Rowlands's avatar Lee Rowlands
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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
  }