Fix null call

This commit is contained in:
James Cole 2016-04-06 21:07:03 +02:00
parent 32190db8bb
commit 732a85e51d
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -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;
}
/**