Skip to content

Commit

Permalink
MDL-42604 scorm: Fix division by zero warnings in error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed Oct 30, 2013
1 parent b6ced2f commit 1efa930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/scorm/report/graphs/graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
$gridlines /= 2;
}
}

$line->parameter['y_axis_gridlines'] = $gridlines + 1;
$gridlines = max(2, ($gridlines + 1)); // We need a minimum of two lines.
$line->parameter['y_axis_gridlines'] = $gridlines;

$line->draw();

0 comments on commit 1efa930

Please sign in to comment.