From 01e654cd145c069b6d805c3aa69bc32e28bf9b8a Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Thu, 20 Mar 2025 17:29:56 +0100 Subject: [PATCH] Get rid of PHP warnings. --- functions/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/functions.php b/functions/functions.php index 750d41a..43e7da7 100644 --- a/functions/functions.php +++ b/functions/functions.php @@ -28,6 +28,10 @@ function get_aggregation(mysqli $db, string $table, $date): array $value_result = $db->query($value_query); $values = []; + $values['avg_meter'] = 0; + $values['avg_power'] = 0; + $values['avg_feed'] = 0; + $values['avg_production'] = 0; while ($row = $value_result->fetch_assoc()) { $production = ($row['production_eg'] + $row['production_og']); $values['date'][] = $row['date'];