This commit is contained in:
salam committed 2026-08-14 20:11:52 +02:00
1 parent f850c114ab
commit 51302c0ffb
1 file changed
+5 -2
+5 -2
View File
@@ -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);