Skip to content

Commit 2c41f9d

Browse files
committed
11077-GeoIP-Extension-Error
1 parent 5dceb66 commit 2c41f9d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Model/IpToCountryRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public function __construct(
9191
*/
9292
public function getCountryCode($ip)
9393
{
94-
if (!is_string($ip)) {
95-
return '';
94+
if ((string)$ip && !isset($ip)) {
95+
return false;
9696
}
9797

9898
if (!isset($this->ipToCountry[$ip])) {

Model/IpToRegionRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function __construct(
8181
*/
8282
public function getRegionCode($ip)
8383
{
84-
if (!is_string($ip)) {
84+
if ((string)$ip && !isset($ip)) {
8585
return '';
8686
}
8787

0 commit comments

Comments
 (0)