Skip to content
Snippets Groups Projects
Commit 217fb971 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix crash processing emails with attachments

parent 93a34c43
Branches
Tags
No related merge requests found
......@@ -757,7 +757,8 @@ class MailFetcher {
// Validate and save immediately
try {
$file['id'] = $fileField->uploadAttachment($file);
if ($f = $fileField->uploadAttachment($file))
$file['id'] = $f->getId();
}
catch (FileUploadError $ex) {
$file['error'] = $file['name'] . ': ' . $ex->getMessage();
......
......@@ -971,6 +971,7 @@ implements TemplateVariable {
}
function createAttachments(array $files) {
$attachments = array();
foreach ($files as $info) {
if ($A = $this->createAttachment($info, @$info['name'] ?: false))
$attachments[] = $A;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment