summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-02-27 17:26:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-02-27 17:26:25 +0000
commit59a619ebbbc1fe9a6a7a1a567b4f037427c18952 (patch)
tree77c3bc45c06751761c7304c6a57ece4fa15fc440
parent77938cc11e2059e323093eca03425c812a7d9cb8 (diff)
downloadredmine-59a619ebbbc1fe9a6a7a1a567b4f037427c18952.tar.gz
redmine-59a619ebbbc1fe9a6a7a1a567b4f037427c18952.zip
fixed #8915: crash when adding a user with a wrong length password
git-svn-id: http://redmine.rubyforge.org/svn/trunk@277 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/application_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 113b1d395..5ef82c90f 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -106,6 +106,7 @@ module ApplicationHelper
full_messages = []
object.errors.each do |attr, msg|
next if msg.nil?
+ msg = msg.first if msg.is_a? Array
if attr == "base"
full_messages << l(msg)
else
@@ -117,6 +118,7 @@ module ApplicationHelper
object.custom_values.each do |v|
v.errors.each do |attr, msg|
next if msg.nil?
+ msg = msg.first if msg.is_a? Array
full_messages << "&#171; " + v.custom_field.name + " &#187; " + l(msg)
end
end