Skip to content
Snippets Groups Projects
Commit da066bc1 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

cast avatar title to string if necessary, fixes #1176

Closes #1176

Merge request studip/studip!697
parent bb62df65
No related branches found
No related tags found
No related merge requests found
...@@ -244,6 +244,11 @@ class Avatar { ...@@ -244,6 +244,11 @@ class Avatar {
$opt['class'] = $this->getCssClass($size); $opt['class'] = $this->getCssClass($size);
} }
// Apply cast to string for title if necessary
if (isset($opt['title']) && !is_string($opt['title'])) {
$opt['title'] = (string) $opt['title'];
}
if (!empty($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 // Decode already htmlready encoded titles (which were used until
// all attributes were encoded inside this method) // all attributes were encoded inside this method)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment