diff --git a/src/ip-location.php b/src/ip-location.php index e3b3656f..571f34a2 100644 --- a/src/ip-location.php +++ b/src/ip-location.php @@ -8,6 +8,11 @@ register_hook('init', function () { return; } + if (!file_exists('data/GeoIP/GeoLite2-City.mmdb')) { + $config['checkIpLocation'] = false; + return; + } + $reader = new Reader('data/GeoIP/GeoLite2-City.mmdb'); try {