]> source.dussan.org Git - redmine.git/commitdiff
Ruby 2.7: Regexp#match and Regexp#match? with a nil argument are deprecated (#32527...
authorGo MAEDA <maeda@farend.jp>
Sat, 30 Nov 2019 05:40:40 +0000 (05:40 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 30 Nov 2019 05:40:40 +0000 (05:40 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19324 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/application_controller.rb

index ea579bfa8cbd19641429486cfd464bfafdefe0b6..88ba2674e682d5cc9b51cb0a33de548f40128073 100644 (file)
@@ -644,7 +644,7 @@ class ApplicationController < ActionController::Base
 
   # Returns a string that can be used as filename value in Content-Disposition header
   def filename_for_content_disposition(name)
-    %r{(MSIE|Trident|Edge)}.match?(request.env['HTTP_USER_AGENT']) ? ERB::Util.url_encode(name) : name
+    %r{(MSIE|Trident|Edge)}.match?(request.env['HTTP_USER_AGENT'].to_s) ? ERB::Util.url_encode(name) : name
   end
 
   def api_request?