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
This commit is contained in:
Jean-Philippe Lang 2010-09-26 08:07:41 +00:00
parent 53b131ba2a
commit e9686cbbe5
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class FilesController < ApplicationController
attachments = Attachment.attach_files(container, params[:attachments]) attachments = Attachment.attach_files(container, params[:attachments])
render_attachment_warning_if_needed(container) 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]) Mailer.deliver_attachments_added(attachments[:files])
end end
redirect_to project_files_path(@project) redirect_to project_files_path(@project)