Try two at hotfix. Audition status screen not working when an entry has only bonus scores.

This commit is contained in:
Matt Young 2024-11-19 18:56:22 -06:00
parent f071950546
commit bac4000253
1 changed files with 6 additions and 0 deletions

View File

@ -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]) {