Get rid of PHP warnings.

This commit is contained in:
2025-03-20 17:29:56 +01:00
parent bb9eddead7
commit 01e654cd14

View File

@@ -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'];