mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: Handle uncaught exception (#11263)
After the search term is parsed for advanced search filters, the term may become empty. Later, the same term will be passed to Discourse.route_for which will raise an ArgumentError. > URI(nil) ArgumentError: bad argument (expected URI object or URI string)
This commit is contained in:
@ -412,7 +412,7 @@ module Discourse
|
||||
unless uri.is_a?(URI)
|
||||
uri = begin
|
||||
URI(uri)
|
||||
rescue URI::Error
|
||||
rescue ArgumentError, URI::Error
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user