]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
When an attachment fails to load, it shouldn't destroy the whole layout by XRevan86
authorDiogo Cordeiro <diogo@fc.up.pt>
Thu, 25 Apr 2019 19:46:31 +0000 (20:46 +0100)
committerDiogo Cordeiro <diogo@fc.up.pt>
Thu, 25 Apr 2019 19:46:47 +0000 (20:46 +0100)
lib/attachmentlistitem.php

index fe11dbe639141b631e8539f17d227b2a26fbdfdc..de1087d44cb75f360df589ecd4abfe8ed9566207 100644 (file)
@@ -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();
     }