forked from science-ation/science-ation
Avoid divide by 0
This commit is contained in:
parent
c11967a9df
commit
4d0f607981
@ -160,7 +160,11 @@ function judges_scheduler_check_judges()
|
||||
echo i18n("Minimum number of judges required: %1",array($minjudges['total']))."<br />";
|
||||
|
||||
foreach($config['languages'] AS $lkey=>$lname) {
|
||||
$minjudges[$lkey]=round($projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
||||
if($minjudges['total'] && $projecttotal)
|
||||
$minjudges[$lkey]=round($projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
||||
else
|
||||
$minjudges[$lkey]=0;
|
||||
|
||||
echo " ".i18n("Minimum number of %1 judges required: %2",array($lname,$minjudges[$lkey]))."<br />";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user