From 2dcbeba1b8af4153a37a6a21f0aed8f7215c9e99 Mon Sep 17 00:00:00 2001 From: alexreisner <alex@alexreisner.com> Date: Wed, 10 Feb 2010 23:38:59 -0500 Subject: [PATCH] Don't query Google with empty string. --- lib/geocoder.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/geocoder.rb b/lib/geocoder.rb index 85295f29..5005afd3 100644 --- a/lib/geocoder.rb +++ b/lib/geocoder.rb @@ -213,6 +213,7 @@ module Geocoder # Returns array [lat,lon] if found, nil if not found or if network error. # def self.fetch_coordinates(query) + return nil if query.blank? return nil unless doc = self.search(query) # make sure search found a result -- GitLab