From c729e0f8da20ffae730b0868e1cb1098211a4101 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 15 Jan 2010 14:53:24 +0000 Subject: [PATCH] Dont let the scheduler run if we have 0 judges available - timmins was in an endless loop since last nite --- admin/judges_sa.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/judges_sa.php b/admin/judges_sa.php index d6f148d..3647f9a 100644 --- a/admin/judges_sa.php +++ b/admin/judges_sa.php @@ -519,6 +519,12 @@ foreach($judges as &$j) { TRACE("Loaded ".count($judges)." judges\n"); $jteam[0]['max_judges'] = count($judges); +if(count($judges)==0) { + echo "No judges available. Aborting!\n"; + set_status("Error - no judges available..."); + set_percent(0); + exit; +} /* Load the numbers for any user-defined judge teams that already exist, * these numbers will be off-limits for auto-assigning numbers */