Skip to content

Commit

Permalink
Merge pull request #3006 from danijelk/danijelk-patch-start_end_date
Browse files Browse the repository at this point in the history
Fix start-end date for $onlyDisruptedDays
  • Loading branch information
jbrooksuk committed Apr 23, 2018
2 parents 5198cca + 46a69a3 commit 01d8841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/StatusPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public function showIndex()
$selectedDays = $allIncidentDays->slice($page * $appIncidentDays, $appIncidentDays)->all();

if (count($selectedDays) > 0) {
$startDate = Date::createFromFormat('Y-m-d', array_values(array_slice($selectedDays, -1))[0]);
$endDate = Date::createFromFormat('Y-m-d', array_values($selectedDays)[0]);
$startDate = Date::createFromFormat('Y-m-d', array_values($selectedDays)[0]);
$endDate = Date::createFromFormat('Y-m-d', array_values(array_slice($selectedDays, -1))[0]);
}

$canPageForward = $page > 0;
Expand Down

0 comments on commit 01d8841

Please sign in to comment.