Merge pull request #3273 from VeekeeFr/patch-1

Fixed rare case of division by 0
This commit is contained in:
James Brooks 2018-10-15 18:31:17 +01:00 committed by GitHub
commit 8cc92b1d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ class StatusPageController extends AbstractApiController
->values();
$numIncidentDays = count($allIncidentDays);
$numPages = round($numIncidentDays / $appIncidentDays);
$numPages = round($numIncidentDays / max($appIncidentDays, 1));
$selectedDays = $allIncidentDays->slice($page * $appIncidentDays, $appIncidentDays)->all();