Skip to content

Commit

Permalink
Fix for the case when picture is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Kolotilkin committed Apr 24, 2014
1 parent 1f1c8fd commit e66f987
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/omniauth/strategies/google_oauth2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def verified_email
end

def image_url
original_url = raw_info['picture'].gsub("https:https://", "https://")
original_url = raw_info['picture']
original_url = original_url.gsub("https:https://", "https://") if original_url
params_index = original_url.index('/photo.jpg') if original_url

if params_index && image_size_opts_passed?
Expand Down

0 comments on commit e66f987

Please sign in to comment.