fix get_ip_location_from_geoip() missing continent_en

This commit is contained in:
xiaomlove
2026-01-15 23:24:28 +07:00
parent c91cf060b1
commit 7494041005

View File

@@ -5885,6 +5885,7 @@ function get_ip_location_from_geoip($ip): bool|array
'city' => '',
'country_en' => '',
'city_en' => '',
'continent_en' => '',
];
try {
$database = nexus_env('GEOIP2_DATABASE');
@@ -5913,7 +5914,7 @@ function get_ip_location_from_geoip($ip): bool|array
$info['continent'] = $continentName;
$info['continent_en'] = $record->continent->names['en'] ?? '';
} catch (\Exception $exception) {
do_log($exception->getMessage());
do_log($exception->getMessage() . ", trace: " . $exception->getTraceAsString(), 'error');
}
return $info;
});