summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-22 06:16:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-22 06:16:53 +0000
commit838025372dc34096464cf19cdd39a1a587e4f176 (patch)
treed8103a18bfc90585c75f3bb9f76890c4abeae44a /app
parent5328c4adcb6c34978652b5245b0de0b98903a6d1 (diff)
downloadredmine-838025372dc34096464cf19cdd39a1a587e4f176.tar.gz
redmine-838025372dc34096464cf19cdd39a1a587e4f176.zip
Potential can't dup NilClass error in UserPreference (#11905).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10438 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/user_preference.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb
index da99061a1..3c46712f9 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -44,7 +44,7 @@ class UserPreference < ActiveRecord::Base
if attribute_present? attr_name
super
else
- h = read_attribute(:others).dup || {}
+ h = (read_attribute(:others) || {}).dup
h.update(attr_name => value)
write_attribute(:others, h)
value