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

prevent warning, fixes #4778

Closes #4778

Merge request studip/studip!3574
parent db83df72
No related branches found
No related tags found
No related merge requests found
......@@ -428,11 +428,11 @@ class BlubberThread extends SimpleORMap implements PrivacyObject
return mb_substr($names, 0, 60);
}
if($this['context_type'] === 'course') {
if ($this['context_type'] === 'course') {
if ($this['content']) {
return mb_substr((string) Course::find($this['context_id'])->name . ': ' . $this['content'], 0, 50) . ' ...';
} else {
return (string) Course::find($this['context_id'])->name;
return (string) (Course::find($this['context_id'])->name ?? _('unbekannt'));
}
}
......
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