From 825d2d69af5864bc2ea755b9a267a4a5a3ed5206 Mon Sep 17 00:00:00 2001 From: Wouter D'Haeseleer Date: Thu, 3 May 2012 12:20:27 +0200 Subject: [PATCH] When the email address is empty gitlab will give a 500 error Since some conversion tools do commits with an empty commiters email address gitlab will fail with a 500 error --- app/helpers/application_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 92f1680e..cfe9e261 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,6 +3,7 @@ module ApplicationHelper def gravatar_icon(user_email, size = 40) gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" + user_email ||= '' user_email.strip! "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon" end