Commit f909e25d1b0e6fec2852631715c0e3886e145477
1 parent
5ff658a6
Exists in
master
and in
4 other branches
Improve gitlab encode method
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/gitlab/encode.rb
... | ... | @@ -27,7 +27,8 @@ module Gitlab |
27 | 27 | |
28 | 28 | # Prevent app from crash cause of encoding errors |
29 | 29 | rescue |
30 | - "--broken encoding: #{detect[:encoding]}" | |
30 | + encoding = detect ? detect[:encoding] : "unknown" | |
31 | + "--broken encoding: #{encoding}" | |
31 | 32 | end |
32 | 33 | |
33 | 34 | def detect_encoding message | ... | ... |