From: Diogo Cordeiro Date: Thu, 25 Apr 2019 19:46:31 +0000 (+0100) Subject: When an attachment fails to load, it shouldn't destroy the whole layout by XRevan86 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bf7f17474dd1bc955da770d914612aac5b618abc;p=quix0rs-gnu-social.git When an attachment fails to load, it shouldn't destroy the whole layout by XRevan86 --- 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(); }