mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 02:40:43 -06:00
Fix null call
This commit is contained in:
parent
32190db8bb
commit
732a85e51d
@ -248,7 +248,12 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
*/
|
||||
public function sumSpentNoCategory(Collection $accounts, Carbon $start, Carbon $end): string
|
||||
{
|
||||
return $this->sumNoCategory($accounts, $start, $end, self::SPENT);
|
||||
$sum = $this->sumNoCategory($accounts, $start, $end, self::SPENT);
|
||||
if (is_null($sum)) {
|
||||
return '0';
|
||||
}
|
||||
|
||||
return $sum;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user