aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/models/BlubberThread.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/BlubberThread.php b/lib/models/BlubberThread.php
index ee391f7..d1fe7c4 100644
--- a/lib/models/BlubberThread.php
+++ b/lib/models/BlubberThread.php
@@ -410,11 +410,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'));
}
}