This commit is contained in:
James Cole 2021-04-09 09:02:00 +02:00
parent e614427925
commit 56b2fa69bc
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -75,6 +75,9 @@ class CurrencyForm
// perhaps the currency has been sent to us in the field $amount_currency_id_$name (amount_currency_id_amount)
$preFilled = session('preFilled');
if (!is_array($preFilled)) {
$preFilled = [];
}
$key = 'amount_currency_id_' . $name;
$sentCurrencyId = array_key_exists($key, $preFilled) ? (int)$preFilled[$key] : $defaultCurrency->id;
@ -141,6 +144,9 @@ class CurrencyForm
// perhaps the currency has been sent to us in the field $amount_currency_id_$name (amount_currency_id_amount)
$preFilled = session('preFilled');
if (!is_array($preFilled)) {
$preFilled = [];
}
$key = 'amount_currency_id_' . $name;
$sentCurrencyId = array_key_exists($key, $preFilled) ? (int)$preFilled[$key] : $defaultCurrency->id;