From 0aed61868fa1ff27b62f17f20502d1ae22443842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 10 Apr 2019 15:48:15 +0200 Subject: [PATCH] Only try to add comment details if the comment was found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Activity/DeckProvider.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Activity/DeckProvider.php b/lib/Activity/DeckProvider.php index eae63c552..d6f2fc4d9 100644 --- a/lib/Activity/DeckProvider.php +++ b/lib/Activity/DeckProvider.php @@ -283,13 +283,13 @@ class DeckProvider implements IProvider { try { $comment = $this->commentsManager->get((int)$subjectParams['comment']); $event->setParsedMessage($comment->getMessage()); + $params['comment'] =[ + 'type' => 'highlight', + 'id' => $subjectParams['comment'], + 'name' => $comment->getMessage() + ]; } catch (NotFoundException $e) { } - $params['comment'] =[ - 'type' => 'highlight', - 'id' => $subjectParams['comment'], - 'name' => $comment->getMessage() - ]; } return $params; }