From 414077a54a3e466cffe277847e33e965d50e7b10 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Tue, 3 Feb 2026 15:48:16 +0100 Subject: [PATCH] fix div by zero --- app/Models/Tournament.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Tournament.php b/app/Models/Tournament.php index 4860fb4..c2636a3 100644 --- a/app/Models/Tournament.php +++ b/app/Models/Tournament.php @@ -80,7 +80,7 @@ class Tournament extends Model { foreach ($runners as $entry) { $result = $entry['runner']; if ($this->total_scoring == 'avg') { - $result->score = $entry['total'] / $entry['rounds']; + $result->score = $entry['rounds'] ? $entry['total'] / $entry['rounds'] : 0; } else { $result ->score = $entry['total']; } -- 2.47.3