mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-01 21:02:54 +09:00
Slight geoip reader fixes (#2559)
Small changes to avoid error generation
This commit is contained in:
1 parent
cc1cd7b467
commit
b41ddec682
2 files changed
+3
-3
No files matched your search
@@ -40,8 +40,8 @@ class Country implements \JsonSerializable
|
||||
|
||||
// Instance the language
|
||||
$country = CountryAlpha2::from($countyRecord['iso_code']);
|
||||
$this->name = $country->getNameInLanguage($language);
|
||||
$this->flag = $country->getFlagEmoji();
|
||||
$this->name = $country->getNameInLanguage($language) ?? 'Unknown';
|
||||
$this->flag = $country->getFlagEmoji() ?? '';
|
||||
|
||||
foreach ($country->getCurrenciesAlpha3() as $currency) {
|
||||
$currencies[] = $currency->value;
|
||||
|
||||
@@ -55,7 +55,7 @@ class Reader
|
||||
*/
|
||||
public function get(string $ipAddress)
|
||||
{
|
||||
return $this->reader->get($ipAddress);
|
||||
return $this->reader->get($ipAddress) ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user