From 1317b99c3d0b8cb2ae0cd163cd8232261689db11 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 29 Jul 2011 17:05:26 +0000 Subject: [PATCH] Fixes mail handler for when there's no attachments (#8651). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6325 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mail_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 2531622a5..c53062bd6 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -198,7 +198,7 @@ class MailHandler < ActionMailer::Base end def add_attachments(obj) - if email.attachments.any? + if email.attachments && email.attachments.any? email.attachments.each do |attachment| obj.attachments << Attachment.create(:container => obj, :file => attachment, -- 2.39.5