diff --git a/src/Entity/Note.php b/src/Entity/Note.php index e288a14bb1..81bcdad8a4 100644 --- a/src/Entity/Note.php +++ b/src/Entity/Note.php @@ -350,7 +350,12 @@ class Note extends Entity { $rendered = null; $mentions = []; - Event::handle('RenderNoteContent', [$this->getContent(), $this->getContentType(), &$rendered, $this->getActor(), Language::getById($this->getLanguageId())->getLocale(), &$mentions]); + Event::handle('RenderNoteContent', [$this->getContent(), + $this->getContentType(), + &$rendered, + $this->getActor(), + is_null($this->getLanguageId()) ? null : Language::getById($this->getLanguageId())->getLocale(), + &$mentions]); $mentioned = []; foreach ($mentions as $mention) { foreach ($mention['mentioned'] as $m) {