mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:02:46 +08:00
Ensure params[:files]
responds to map
in Lograge.
This commit is contained in:
parent
fcae21c4fc
commit
0a14e0a256
|
@ -53,7 +53,7 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
|
|||
params[:file] = file.headers
|
||||
end
|
||||
|
||||
if (files = params[:files])
|
||||
if (files = params[:files]) && files.respond_to?(:map)
|
||||
params[:files] = files.map do |file|
|
||||
file.respond_to?(:headers) ? file.headers : file
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user