mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-08 18:58:07 +00:00
Fix null pointer
This commit is contained in:
@@ -277,7 +277,10 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
|||||||
{
|
{
|
||||||
/** @var Transaction $transaction */
|
/** @var Transaction $transaction */
|
||||||
$transaction = $journal->transactions->first();
|
$transaction = $journal->transactions->first();
|
||||||
if (null === $transaction->foreign_amount) {
|
if (null === $transaction->foreign_amount || '' === $transaction->foreign_amount) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if (0 === bccomp('0', $transaction->foreign_amount)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
$currency = $transaction->foreignCurrency;
|
$currency = $transaction->foreignCurrency;
|
||||||
|
|||||||
Reference in New Issue
Block a user