mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: if favicon is missing due to bad url we would return a 500 on favicons
This ensures that the error logging does not corrupt the cache
This commit is contained in:
@ -143,6 +143,7 @@ class StaticController < ApplicationController
|
|||||||
rescue => e
|
rescue => e
|
||||||
AdminDashboardData.add_problem_message('dashboard.bad_favicon_url', 1800)
|
AdminDashboardData.add_problem_message('dashboard.bad_favicon_url', 1800)
|
||||||
Rails.logger.warn("Failed to fetch faivcon #{favicon.url}: #{e}\n#{e.backtrace}")
|
Rails.logger.warn("Failed to fetch faivcon #{favicon.url}: #{e}\n#{e.backtrace}")
|
||||||
|
""
|
||||||
ensure
|
ensure
|
||||||
file&.unlink
|
file&.unlink
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user