Skip to content

Firefly III: a personal finances manager

Fix split edit.

James Cole2685256c93d8
diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php
index 807bf1ab10..5b184eb55b 100644
--- a/app/Http/Controllers/Transaction/SplitController.php
+++ b/app/Http/Controllers/Transaction/SplitController.php
@@ -267,8 +267,8 @@ class SplitController extends Controller
// take some info from first transaction, that should at least exist.
$array[$index] = $row;
$array[$index]['currency_id'] = $array[0]['transaction_currency_id'];
- $array[$index]['currency_code'] = $array[0]['transaction_currency_code'];
- $array[$index]['currency_symbol'] = $array[0]['transaction_currency_symbol'];
+ $array[$index]['currency_code'] = $array[0]['transaction_currency_code'] ?? '';
+ $array[$index]['currency_symbol'] = $array[0]['transaction_currency_symbol'] ?? '';
$array[$index]['foreign_amount'] = round($array[0]['foreign_destination_amount'] ?? '0', 12);
$array[$index]['foreign_currency_id'] = $array[0]['foreign_currency_id'];
$array[$index]['foreign_currency_code'] = $array[0]['foreign_currency_code'];
diff --git a/app/Http/Requests/SplitJournalFormRequest.php b/app/Http/Requests/SplitJournalFormRequest.php
index 7f7d0f7737..207754df5b 100644
--- a/app/Http/Requests/SplitJournalFormRequest.php
+++ b/app/Http/Requests/SplitJournalFormRequest.php
@@ -90,12 +90,12 @@ class SplitJournalFormRequest extends Request
'identifier' => $index,
'currency_id' => $this->integer('journal_currency_id'),
'currency_code' => null,
- 'description' => $transaction['transaction_description'],
+ 'description' => $transaction['transaction_description'] ?? '',
'amount' => $transaction['amount'],
'budget_id' => (int)($transaction['budget_id'] ?? 0.0),
'budget_name' => null,
'category_id' => null,
- 'category_name' => $transaction['category_name'],
+ 'category_name' => $transaction['category_name'] ?? '',
];
$data['transactions'][] = $set;
}