mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 00:54:49 +02:00
Issue #5079 - Avoid division by zero.
This commit is contained in:
@@ -2320,7 +2320,7 @@ class e_form
|
||||
|
||||
// $multiplier = 100 / (int) $denom;
|
||||
|
||||
$value = ((int) $score / (int) $denom) * 100;
|
||||
$value = !empty($denom) ? ((int) $score / (int) $denom) * 100 : 0;
|
||||
|
||||
// $value = (int) $score * (int) $multiplier;
|
||||
$percVal = round((float) $value).'%';
|
||||
|
Reference in New Issue
Block a user