diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 03:06:12 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 03:06:12 +0000 |
commit | f155cc9034f2247c5d368f9b0212ad44248b0c5e (patch) | |
tree | 902480293b665d74a337aeae6a0521104f561988 /config/settings.rb | |
parent | c920712fab6abdc37de9444e6bbcd170c295b21a (diff) | |
download | gitlab-ce-f155cc9034f2247c5d368f9b0212ad44248b0c5e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/settings.rb')
-rw-r--r-- | config/settings.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/settings.rb b/config/settings.rb index 8756c120645..767c6c56337 100644 --- a/config/settings.rb +++ b/config/settings.rb @@ -104,10 +104,10 @@ class Settings < Settingslogic # check that `current` (string or integer) is a contant in `modul`. def verify_constant(modul, current, default) - constant = modul.constants.find { |name| modul.const_get(name) == current } - value = constant.nil? ? default : modul.const_get(constant) + constant = modul.constants.find { |name| modul.const_get(name, false) == current } + value = constant.nil? ? default : modul.const_get(constant, false) if current.is_a? String - value = modul.const_get(current.upcase) rescue default + value = modul.const_get(current.upcase, false) rescue default end value |