Fix null pointer

This commit is contained in:
James Cole
2024-01-05 10:55:46 +01:00
parent 25a23801be
commit f9463e02a2
11 changed files with 23 additions and 3 deletions

View File

@@ -280,12 +280,12 @@ class RecurrenceFormRequest extends FormRequest
if ('deposit' === $type) {
$throwError = false;
$sourceId = (int) $data['deposit_source_id'];
$destinationId = (int) $data['destination_id'];
$destinationId = (int) ($data['destination_id'] ?? 0);
}
if ('transfer' === $type) {
$throwError = false;
$sourceId = (int) $data['source_id'];
$destinationId = (int) $data['destination_id'];
$destinationId = (int) ($data['destination_id'] ?? 0);
}
if (true === $throwError) {
throw new FireflyException(sprintf('Cannot handle transaction type "%s"', $this->convertString('transaction_type')));