Skip to content

Commit 5dceb66

Browse files
committed
11077-GeoIP-Extension-Error
1 parent 9e825f9 commit 5dceb66

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Model/IpToCountryRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ public function __construct(
9191
*/
9292
public function getCountryCode($ip)
9393
{
94+
if (!is_string($ip)) {
95+
return '';
96+
}
97+
9498
if (!isset($this->ipToCountry[$ip])) {
9599
$this->ipToCountry[$ip] = false;
96100

Model/IpToRegionRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public function __construct(
8181
*/
8282
public function getRegionCode($ip)
8383
{
84+
if (!is_string($ip)) {
85+
return '';
86+
}
87+
8488
if (!isset($this->ipToRegion[$ip])) {
8589
$this->ipToRegion[$ip] = '';
8690

0 commit comments

Comments
 (0)