mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-23 20:38:46 +00:00
Add JSON decrypt for #2125
This commit is contained in:
@@ -147,6 +147,11 @@ class UpgradeDatabase extends Command
|
||||
}
|
||||
$currencyCode = $this->tryDecrypt($currencyPreference->data);
|
||||
|
||||
// try json decrypt just in case.
|
||||
if (\strlen($currencyCode) > 3) {
|
||||
$currencyCode = json_decode($currencyCode) ?? 'EUR';
|
||||
}
|
||||
|
||||
$currency = TransactionCurrency::where('code', $currencyCode)->first();
|
||||
if (null === $currency) {
|
||||
$this->line('Fall back to default currency in migrateBillsToRules().');
|
||||
|
||||
Reference in New Issue
Block a user