From 51302c0ffb801594ad0cf27fc7e93ad759043945 Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 14 Aug 2026 20:11:52 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/StatsMedianAverage.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Filament/Widgets/StatsMedianAverage.php b/app/Filament/Widgets/StatsMedianAverage.php index bc7f139f..a99a38a3 100644 --- a/app/Filament/Widgets/StatsMedianAverage.php +++ b/app/Filament/Widgets/StatsMedianAverage.php @@ -77,19 +77,22 @@ class StatsMedianAverage extends StatsOverviewWidget // $median_away = 0; // } - if (isset($data['results'])) { + if (isset($data['results']) && $team_id) { // Log::debug($data['results']); $win = $data['results']['w'] ? number_format(Round::odd($total_home / $data['results']['w']), 2) : 0; $draw = $data['results']['d'] ? number_format(Round::odd($total_home / $data['results']['d']), 2) : 0; $lost = $data['results']['l'] ? number_format(Round::odd($total_home / $data['results']['l']), 2) : 0; } else { - return []; + $win = 0; + $draw = 0; + $lost = 0; } if ($total_home && $team_id) { $value_home = number_format($summe_home / $total_home, 1); } else { $value_home = 0; + $total_home = 0; } if ($total_away && $team_id) { $value_away = number_format($summe_away / $total_away, 1);