Skip to content

Commit

Permalink
Fix freegeoip property because of an API change
Browse files Browse the repository at this point in the history
FreeGeoIp updated API to 3.0 (cf. fiorix/freegeoip@0e7907b) and changed how to handle zip code field. The field is zip_code now.

Fix #368
  • Loading branch information
willdurand committed Dec 8, 2014
1 parent dfc841c commit 1374d71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Geocoder/Provider/FreeGeoIpProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function executeQuery($query)
'latitude' => isset($data['latitude']) ? $data['latitude'] : null,
'longitude' => isset($data['longitude']) ? $data['longitude'] : null,
'city' => isset($data['city']) ? $data['city'] : null,
'zipcode' => isset($data['zipcode']) ? $data['zipcode'] : null,
'zipcode' => isset($data['zip_code']) ? $data['zip_code'] : null,
'region' => isset($data['region_name']) ? $data['region_name'] : null,
'regionCode' => isset($data['region_code']) ? $data['region_code'] : null,
'country' => isset($data['country_name']) ? $data['country_name'] : null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
s:223:"{"ip":"74.200.247.59","country_code":"US","country_name":"United States","region_code":"TX","region_name":"Texas","city":"Plano","zipcode":"75093","latitude":33.0347,"longitude":-96.8134,"metro_code":"623","areacode":"972"}";
s:234:"{"ip":"74.200.247.59","country_code":"US","country_name":"United States","region_code":"TX","region_name":"Texas","city":"Plano","zip_code":"75093","time_zone":"America/Chicago","latitude":33.035,"longitude":-96.814,"metro_code":623}
";
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
s:223:"{"ip":"74.200.247.59","country_code":"US","country_name":"United States","region_code":"TX","region_name":"Texas","city":"Plano","zipcode":"75093","latitude":33.0347,"longitude":-96.8134,"metro_code":"623","areacode":"972"}";
s:234:"{"ip":"74.200.247.59","country_code":"US","country_name":"United States","region_code":"TX","region_name":"Texas","city":"Plano","zip_code":"75093","time_zone":"America/Chicago","latitude":33.035,"longitude":-96.814,"metro_code":623}
";

0 comments on commit 1374d71

Please sign in to comment.