Installation on 3.8.1 fails: Exception AccountRepository.php #1738

This commit is contained in:
Hillel Coren 2017-11-10 12:21:27 +02:00
parent 05ad79e207
commit 443c2193d5

View File

@ -59,6 +59,7 @@ class AccountRepository
$account->company_id = $company->id; $account->company_id = $company->id;
// Set default language/currency based on IP // 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)); $data = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $account->ip));
$currencyCode = strtolower($data['geoplugin_currencyCode']); $currencyCode = strtolower($data['geoplugin_currencyCode']);
$countryCode = strtolower($data['geoplugin_countryCode']); $countryCode = strtolower($data['geoplugin_countryCode']);
@ -83,6 +84,7 @@ class AccountRepository
if ($language) { if ($language) {
$account->language_id = $language->id; $account->language_id = $language->id;
} }
}
$account->save(); $account->save();