Commit 70dbb722 authored by dmorley's avatar dmorley

update packages

parent 182f62fe
......@@ -334,7 +334,11 @@ foreach ($pods as $pod) {
// todo: Temporary workaround (see https://github.com/akalongman/php-ip-tools/issues/8)
if (Ip::isValid($ip) && Ip::isRemote($ip) && $ip != '0.0.0.0') {
$geo = $reader->city($ip);
try {
$geo = $reader->city($ip);
} catch (\GeoIp2\Exception\AddressNotFoundException $e) {
} catch (\MaxMind\Db\Reader\InvalidDatabaseException $e) {
}
$countryname = ($geo->country->name ?? null) ?: null;
$country = ($geo->country->isoCode ?? null) ?: null;
$city = ($geo->city->name ?? null) ?: null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment