Viewing 1 replies (of 1 total)
  • For what it’s worth….

    I got this and found a solution. It’s probably not the most elegant, but…

    I added a test at each line where the offending piece of code occurred (lines 208, 223, and 239); if $scoreBasis (the offending divisor) is equal to zero, the code sets $score to zero. Otherwise it runs the calculation as written:

    if ($scoreBasis != 0) {$score = 100 - (($levscore / $scoreBasis)*100);} else $score=0;

Viewing 1 replies (of 1 total)
  • The topic ‘Division by zero error’ is closed to new replies.