aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Downloads.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Downloads.php')
-rw-r--r--lib/Downloads.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Downloads.php b/lib/Downloads.php
index e64c9ee45..614ad09d1 100644
--- a/lib/Downloads.php
+++ b/lib/Downloads.php
@@ -169,14 +169,15 @@ class Downloads
if (function_exists('geoip_country_code_by_name'))
{
- $loc = geoip_country_code_by_name($ip);
+ // may shout a "Host {IP} not found"
+ $loc = @geoip_country_code_by_name($ip);
}
else
{
require_once '../../lib/maxmind/geoip/geoip.inc.php';
$gi = geoip_open(realpath('../../lib/maxmind/geoip/GeoIP.dat'),
GEOIP_STANDARD);
- $loc = geoip_country_code_by_addr($gi, $ip);
+ $loc = @geoip_country_code_by_addr($gi, $ip);
geoip_close($gi);
}
if (trim($loc) == '' || is_null($loc))