diff --git a/judge.class.php b/judge.class.php index e3fd516..80667a1 100644 --- a/judge.class.php +++ b/judge.class.php @@ -145,11 +145,13 @@ function tableEditorSetup($editor) $editor->setFieldInputType("divpref_$did", 'select'); } - foreach($sa as $said=>$special_award) { - $editor->setFieldOptions("sa_$said", array( - array('key' => 'yes', 'val' => 'Would like to judge'), - array('key' => '', 'val' => ''))); - $editor->setFieldInputType("sa_$said", 'select'); + if(count($sa)) { + foreach($sa as $said=>$special_award) { + $editor->setFieldOptions("sa_$said", array( + array('key' => 'yes', 'val' => 'Would like to judge'), + array('key' => '', 'val' => ''))); + $editor->setFieldInputType("sa_$said", 'select'); + } } $editor->setFieldOptions('typepref', array(