From ccb886b71552d06a3fa07e0571c647e7dbf30a28 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 15 Dec 2012 10:03:52 +0000 Subject: Verifies that the param is a Hash. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11011 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins') diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb index 344ff0866..7da2841d1 100644 --- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb +++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb @@ -78,6 +78,7 @@ module Redmine end if attachments.is_a?(Array) attachments.each do |attachment| + next unless attachment.is_a?(Hash) a = nil if file = attachment['file'] next unless file.size > 0 -- cgit v1.2.3