From cb83f5c0c694489e3089f19684580d619959fbf6 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Fri, 29 May 2015 20:43:12 +0100 Subject: [PATCH] Fix bug with sorting of incident dates --- app/Http/Controllers/HomeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 0d06edd0..26ea429e 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -83,7 +83,7 @@ class HomeController extends AbstractController } // Sort the array so it takes into account the added days - $allIncidents->sortBy(function ($value, $key) { + $allIncidents = $allIncidents->sortBy(function ($value, $key) { return strtotime($key); }, SORT_REGULAR, true);