Commit 82ebb827 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang Committed by Eric Davis

Fixes error in RepositoriesHelper#replace_invalid_utf8 when given nil.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5170 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent af40f867
......@@ -148,6 +148,7 @@ module RepositoriesHelper
private :to_utf8_internal
def replace_invalid_utf8(str)
return str if str.nil?
if str.respond_to?(:force_encoding)
str.force_encoding('UTF-8')
if ! str.valid_encoding?
......
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