From bf7f17474dd1bc955da770d914612aac5b618abc Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Thu, 25 Apr 2019 20:46:31 +0100 Subject: [PATCH] When an attachment fails to load, it shouldn't destroy the whole layout by XRevan86 --- lib/attachmentlistitem.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/attachmentlistitem.php b/lib/attachmentlistitem.php index fe11dbe639..de1087d44c 100644 --- a/lib/attachmentlistitem.php +++ b/lib/attachmentlistitem.php @@ -81,7 +81,12 @@ class AttachmentListItem extends Widget function show() { $this->showStart(); - $this->showNoticeAttachment(); + try { + $this->showNoticeAttachment(); + } catch (Exception $e) { + $this->element('div', ['class'=>'error'], $e->getMessage()); + common_debug($e->getMessage()); + } $this->showEnd(); }