summaryrefslogtreecommitdiffstats
path: root/app/controllers/files_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-09-26 08:07:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-09-26 08:07:41 +0000
commite9686cbbe57a671468588638ddc3d6a923400694 (patch)
tree2f184b8b48e66a2b213311b7045882c70b9dd416 /app/controllers/files_controller.rb
parent53b131ba2a68e6aa21aae388d571e8b77ffe7aa9 (diff)
downloadredmine-e9686cbbe57a671468588638ddc3d6a923400694.tar.gz
redmine-e9686cbbe57a671468588638ddc3d6a923400694.zip
Fixed: error on mail notification when adding an invalid file (#6452).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4177 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/files_controller.rb')
-rw-r--r--app/controllers/files_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 72a4a2411..d7234985e 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -28,7 +28,7 @@ class FilesController < ApplicationController
attachments = Attachment.attach_files(container, params[:attachments])
render_attachment_warning_if_needed(container)
- if !attachments.empty? && Setting.notified_events.include?('file_added')
+ if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
Mailer.deliver_attachments_added(attachments[:files])
end
redirect_to project_files_path(@project)