Browse Source

ip-location: if data is not downloaded, skip initialization

master
parent
commit
d3c5be4f56
  1. 5
      src/ip-location.php

5
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 {

Loading…
Cancel
Save