Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.1
-
Fix Version/s: 2.1
-
Component/s: Core CiviCRM
-
Labels:None
Description
The current code for the Google Geocode script results in a query that looks like the following:
http://maps.google.com/maps/geo?q=?481+Giddyup+Dr,++Mytown,++Mystate,++11223
The extra '?' after the q= is ignored on the first few queries, but after 50-100 queries, Google starts to fail the requests with an error indicating that the request looks like a hacking attempt.
Line 123 of the Google Geocode script looks like this:
$query = 'http://' . self::$_server . self::$_uri . '?' . $add . $arg;
self:$_uri is set to '?q=' at the top of the script, so simply modifying this to:
$query = 'http://' . self::$_server . self::$_uri . $add . $arg;
takes care of the issue.