From 7e9805aa953e65deadbded802ec76cecac8f595f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 16 Jul 2017 11:47:55 +0000 Subject: Merged r16812 (#26393). git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@16817 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/settings_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index 51ab871ca..7b2dceb31 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -67,7 +67,8 @@ class SettingsController < ApplicationController end if request.post? - Setting.send "plugin_#{@plugin.id}=", params[:settings].permit!.to_h + setting = params[:settings] ? params[:settings].permit!.to_h : {} + Setting.send "plugin_#{@plugin.id}=", setting flash[:notice] = l(:notice_successful_update) redirect_to plugin_settings_path(@plugin) else -- cgit v1.2.3