Skip to content

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Geocoder/Provider/GeoIP2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function geocode($address)
6464
}
6565

6666
return $this->returnResults([
67-
array_merge($this->getDefaults(), array(
67+
$this->fixEncoding(array_merge($this->getDefaults(), array(
6868
'countryCode' => (isset($result->country->iso_code) ? $result->country->iso_code : null),
6969
'country' => (isset($result->country->names->{$this->locale}) ? $result->country->names->{$this->locale} : null),
7070
'locality' => (isset($result->city->names->{$this->locale}) ? $result->city->names->{$this->locale} : null),
@@ -74,7 +74,7 @@ public function geocode($address)
7474
'postalCode' => (isset($result->location->postalcode) ? $result->location->postalcode : null),
7575
'region' => $region,
7676
'regionCode' => $regionCode
77-
))
77+
)))
7878
]);
7979
}
8080

src/Geocoder/Provider/Geoip.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function geocode($address)
5858
$region = @geoip_region_name_by_code($results['country_code'], $results['region']) ?: $results['region'];
5959

6060
return $this->returnResults([
61-
array_merge($this->getDefaults(), [
61+
$this->fixEncoding(array_merge($this->getDefaults(), [
6262
'latitude' => $results['latitude'],
6363
'longitude' => $results['longitude'],
6464
'locality' => $results['city'],
@@ -68,7 +68,7 @@ public function geocode($address)
6868
'country' => $results['country_name'],
6969
'countryCode' => $results['country_code'],
7070
'timezone' => $timezone,
71-
])
71+
]))
7272
]);
7373
}
7474

0 commit comments

Comments
 (0)