From bac40002531e3f153682e29fcd1723b5ff5d2148 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Tue, 19 Nov 2024 18:56:22 -0600 Subject: [PATCH] Try two at hotfix. Audition status screen not working when an entry has only bonus scores. --- app/Actions/Tabulation/RankAuditionEntries.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Actions/Tabulation/RankAuditionEntries.php b/app/Actions/Tabulation/RankAuditionEntries.php index e593462..21e1049 100644 --- a/app/Actions/Tabulation/RankAuditionEntries.php +++ b/app/Actions/Tabulation/RankAuditionEntries.php @@ -56,6 +56,12 @@ class RankAuditionEntries // Sort entries based on their total score, then by subscores in tiebreak order $entries = $entries->sort(function ($a, $b) { for ($i = 0; $i < count($a->score_totals); $i++) { + if (! array_key_exists($i, $a->score_totals)) { + return -1; + } + if (! array_key_exists($i, $b->score_totals)) { + return -1; + } if ($a->score_totals[$i] > $b->score_totals[$i]) { return -1; } elseif ($a->score_totals[$i] < $b->score_totals[$i]) {