From c2cecc898c63595ebaaed14dd2ef3574e1c136ab Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Wed, 17 Jun 2015 09:13:39 +0200 Subject: [PATCH] Fixed possible edge case when choosing static attachments that do not exist anymore --- .../NotificationCenter/MessageDraft/EmailMessageDraft.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/NotificationCenter/MessageDraft/EmailMessageDraft.php b/library/NotificationCenter/MessageDraft/EmailMessageDraft.php index 0efb020b..59edf51e 100644 --- a/library/NotificationCenter/MessageDraft/EmailMessageDraft.php +++ b/library/NotificationCenter/MessageDraft/EmailMessageDraft.php @@ -196,6 +196,11 @@ public function getAttachments() if (!empty($arrStaticAttachments)) { $objFiles = \FilesModel::findMultipleByUuids($arrStaticAttachments); + + if ($objFiles === null) { + return $arrAttachments; + } + while ($objFiles->next()) { $arrAttachments[] = TL_ROOT . '/' . $objFiles->path; }