Fix nullpointer

This commit is contained in:
James Cole 2022-07-03 08:45:08 +02:00
parent 68755137e4
commit 196c504b3d
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -116,7 +116,7 @@ class TransactionGroupTransformer extends AbstractTransformer
$row = new NullArrayObject($transaction);
// amount:
$amount = app('steam')->positive((string)($row['amount'] ?? '0'));
$amount = app('steam')->positive((string) ($row['amount'] ?? '0'));
$foreignAmount = null;
if (null !== $row['foreign_amount']) {
$foreignAmount = app('steam')->positive($row['foreign_amount']);
@ -124,7 +124,9 @@ class TransactionGroupTransformer extends AbstractTransformer
$metaFieldData = $this->groupRepos->getMetaFields((int) $row['transaction_journal_id'], $this->metaFields);
$metaDateData = $this->groupRepos->getMetaDateFields((int) $row['transaction_journal_id'], $this->metaDateFields);
$type = $this->stringFromArray($transaction, 'transaction_type_type', TransactionType::WITHDRAWAL);
$longitude = null;
$latitude = null;
$zoomLevel = null;