]> source.dussan.org Git - redmine.git/commitdiff
Fixed that non array commit_update_keywords raises an error (#7590).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 13 Oct 2013 10:03:13 +0000 (10:03 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 13 Oct 2013 10:03:13 +0000 (10:03 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12216 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/settings_controller.rb

index fdd6bf4f05af12b80955a551b8a3cc1862c4812b..a115a30f0f7ed019fade9c04f45449ef23c830c3 100644 (file)
@@ -47,7 +47,7 @@ class SettingsController < ApplicationController
       @guessed_host_and_path << ('/'+ Redmine::Utils.relative_url_root.gsub(%r{^\/}, '')) unless Redmine::Utils.relative_url_root.blank?
 
       @commit_update_keywords = Setting.commit_update_keywords.dup
-      @commit_update_keywords << {} if @commit_update_keywords.blank?
+      @commit_update_keywords = [{}] unless @commit_update_keywords.is_a?(Array) && @commit_update_keywords.any?
 
       Redmine::Themes.rescan
     end