fix(ip-api): Add error handling and logging for freeipapi.com requests (#2006)

This commit is contained in:
Roman Kelesidis 2025-06-24 12:55:41 +03:00
commit 12ce6e783e
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4
2 changed files with 19 additions and 10 deletions

View file

@ -475,6 +475,8 @@ if ($tor_reged && $tor_info) {
if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) {
if (!empty($infoByIP['countryCode'])) {
$peerCountry = render_flag($infoByIP['countryCode'], false);
} else {
$peerCountry = $lang['NOT_AVAILABLE'];
}
}
}