Fix handling of settings not existing

This commit is contained in:
James Brooks
2015-05-29 21:56:06 +01:00
parent cb83f5c0c6
commit 672f475a0d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ class Repository
}
// if the setting exists, return it
if (isset($this->settings[$name])) {
if (isset($this->settings[$name]) && $this->settings[$name]) {
return $this->settings[$name];
}
+1 -1
View File
@@ -85,7 +85,7 @@ class HomeController extends AbstractController
// Sort the array so it takes into account the added days
$allIncidents = $allIncidents->sortBy(function ($value, $key) {
return strtotime($key);
}, SORT_REGULAR, true);
}, SORT_REGULAR, true)->all();
// Scheduled maintenance code.
$scheduledMaintenance = Incident::scheduled()->orderBy('scheduled_at')->get();