When an attachment fails to load, it shouldn't destroy the whole layout by XRevan86

This commit is contained in:
Diogo Cordeiro 2019-04-25 20:46:31 +01:00
parent 8a07edec5f
commit bf7f17474d
1 changed files with 6 additions and 1 deletions

View 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();
}