From 8bff1b1f39fdbc3670852259a2e6d2bdeb692db6 Mon Sep 17 00:00:00 2001 From: Kim Nguyen Date: Mon, 4 Nov 2024 15:44:35 -0500 Subject: [PATCH] Fix missing alt attribute if alt text not set. --- application/views/helpers/FileMarkup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/helpers/FileMarkup.php b/application/views/helpers/FileMarkup.php index ae4b2fec9..65d8f4682 100644 --- a/application/views/helpers/FileMarkup.php +++ b/application/views/helpers/FileMarkup.php @@ -637,7 +637,7 @@ public function image_tag($record, $attrs, $format) if (isset($attrs['alt'])) { $alt = $attrs['alt']; } else { - $alt = $file->getAltText(); + $alt = ($file->getAltText()) ? $file->getAltText() : ''; } $attrs['alt'] = $alt;