Fix possible null pointer [skip ci]

This commit is contained in:
James Cole 2017-11-01 16:30:55 +01:00
parent 1e91be420b
commit 59213ed605
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -590,7 +590,7 @@ class BudgetController extends Controller
$collector = app(JournalCollectorInterface::class);
$collector->setAllAssetAccounts()->setRange($end, $currentEnd)->withoutBudget()->withOpposingAccount()->setTypes([TransactionType::WITHDRAWAL]);
$set = $collector->getJournals();
$sum = $set->sum('transaction_amount');
$sum = $set->sum('transaction_amount') ?? '0';
$journals = $set->count();
$dateStr = $end->format('Y-m-d');
$dateName = Navigation::periodShow($end, $range);