diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-22 06:16:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-22 06:16:53 +0000 |
commit | 838025372dc34096464cf19cdd39a1a587e4f176 (patch) | |
tree | d8103a18bfc90585c75f3bb9f76890c4abeae44a /app | |
parent | 5328c4adcb6c34978652b5245b0de0b98903a6d1 (diff) | |
download | redmine-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.rb | 2 |
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 |