Hotfix error on tabulation page.

This commit is contained in:
Matt Young 2024-11-19 18:10:02 -06:00
parent b99f7b871b
commit 61df1c4351
1 changed files with 2 additions and 2 deletions

View File

@ -56,9 +56,9 @@ class RankAuditionEntries
// Sort entries based on their total score, then by subscores in tiebreak order // Sort entries based on their total score, then by subscores in tiebreak order
$entries = $entries->sort(function ($a, $b) { $entries = $entries->sort(function ($a, $b) {
for ($i = 0; $i < count($a->score_totals); $i++) { for ($i = 0; $i < count($a->score_totals); $i++) {
if ($a->score_totals[$i] > $b->score_totals[$i]) { if ($a->score_totals[$i] ?? $b->score_totals[$i] < 0 ?? 0) {
return -1; return -1;
} elseif ($a->score_totals[$i] < $b->score_totals[$i]) { } elseif ($a->score_totals[$i] ?? $b->score_totals[$i] > 0 ?? 0) {
return 1; return 1;
} }
} }