From: Jean-Philippe Lang Date: Sat, 3 Jun 2017 09:20:58 +0000 (+0000) Subject: Don't check that param is a Hash. X-Git-Tag: 3.4.0~82 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5975bef0846982b13d40d2b323edd0580cf9b4ad;p=redmine.git Don't check that param is a Hash. git-svn-id: http://svn.redmine.org/redmine/trunk@16606 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index eeb2bced7..cbe38210e 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -69,7 +69,7 @@ class RepositoriesController < ApplicationController @users += User.where(:id => additional_user_ids).to_a unless additional_user_ids.empty? @users.compact! @users.sort! - if request.post? && params[:committers].is_a?(Hash) + if request.post? && params[:committers].present? # Build a hash with repository usernames as keys and corresponding user ids as values @repository.committer_ids = params[:committers].values.inject({}) {|h, c| h[c.first] = c.last; h} flash[:notice] = l(:notice_successful_update)