From 5ee338926e606a0c755b5cdeb36b40addfb72dc2 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Thu, 12 May 2022 13:35:35 +0000
Subject: [PATCH] ensure title is set before adding

Closes #1051

Merge request studip/studip!614
---
 lib/classes/Avatar.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/classes/Avatar.class.php b/lib/classes/Avatar.class.php
index dab3f75ec3e..f9866cf3940 100644
--- a/lib/classes/Avatar.class.php
+++ b/lib/classes/Avatar.class.php
@@ -244,7 +244,7 @@ class Avatar {
             $opt['class'] = $this->getCssClass($size);
         }
 
-        if (isset($opt['title']) && $opt['title'] !== html_entity_decode($opt['title'])) {
+        if (!empty($opt['title']) && $opt['title'] !== html_entity_decode($opt['title'])) {
             // Decode already htmlready encoded titles (which were used until
             // all attributes were encoded inside this method)
             $opt['title'] = html_entity_decode($opt['title']);
-- 
GitLab