Commit f909e25d authored by randx's avatar randx

Improve gitlab encode method

parent 5ff658a6
...@@ -27,7 +27,8 @@ module Gitlab ...@@ -27,7 +27,8 @@ module Gitlab
# Prevent app from crash cause of encoding errors # Prevent app from crash cause of encoding errors
rescue rescue
"--broken encoding: #{detect[:encoding]}" encoding = detect ? detect[:encoding] : "unknown"
"--broken encoding: #{encoding}"
end end
def detect_encoding message def detect_encoding message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment