Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpsan authored Apr 6, 2023
1 parent 0f56a8a commit 129d488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GeoIp.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ public function getInfoDb($ip = null)
$userip = $ip;
else
$userip = $this->getIp();
if (!$userip)
return false;

$response = new Database(Yii::getAlias('@vendor') . '/ip2location/ip2location-php/data/IP2LOCATION-LITE-DB1.BIN', \IP2Location\Database::FILE_IO);
$result = $response->lookup($userip, \IP2Location\Database::ALL);
Expand Down

0 comments on commit 129d488

Please sign in to comment.