From 7cb41fb333f927fb4f470a154bbb3924706cef75 Mon Sep 17 00:00:00 2001 From: Sander Dorigo Date: Tue, 11 Feb 2025 10:41:32 +0100 Subject: [PATCH] fix a null pointer --- app/Support/Chart/Budget/FrontpageChartGenerator.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Support/Chart/Budget/FrontpageChartGenerator.php b/app/Support/Chart/Budget/FrontpageChartGenerator.php index 5c96be4488..f3dc2c2b0c 100644 --- a/app/Support/Chart/Budget/FrontpageChartGenerator.php +++ b/app/Support/Chart/Budget/FrontpageChartGenerator.php @@ -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';