mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Handle service failure
This commit is contained in:
parent
edc944a122
commit
d02b15d642
@ -64,7 +64,7 @@ class AccountRepository
|
||||
|
||||
// Set default language/currency based on IP
|
||||
if (\Cache::get('currencies')) {
|
||||
$data = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $account->ip));
|
||||
if ($data = unserialize(@file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $account->ip))) {
|
||||
$currencyCode = strtolower($data['geoplugin_currencyCode']);
|
||||
$countryCode = strtolower($data['geoplugin_countryCode']);
|
||||
|
||||
@ -89,6 +89,7 @@ class AccountRepository
|
||||
$account->language_id = $language->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$account->save();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user