fix a null pointer

This commit is contained in:
Sander Dorigo 2025-02-11 10:41:32 +01:00
parent d38adbfdc2
commit 7cb41fb333

View File

@ -203,8 +203,7 @@ class FrontpageChartGenerator
$amount = $limit->native_amount;
Log::debug(sprintf('Amount is now "%s".', $amount));
}
$amount = null === $amount ? '0' : $amount;
$sumSpent = bcmul($entry['sum'], '-1'); // spent
$data[0]['entries'][$title] ??= '0';
$data[1]['entries'][$title] ??= '0';