From 15297205c453893a2a7df0b605756c11533b21c8 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 18 Mar 2017 09:59:46 +0000 Subject: [PATCH] Clone to prevent scoping incorrectly. Fixes #2430 --- app/Integrations/Core/System.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Integrations/Core/System.php b/app/Integrations/Core/System.php index 5504c21c88e6..49851503b8b7 100644 --- a/app/Integrations/Core/System.php +++ b/app/Integrations/Core/System.php @@ -50,8 +50,8 @@ public function __construct(Repository $config) public function getStatus() { $enabledScope = Component::enabled(); - $totalComponents = $enabledScope->count(); - $majorOutages = $enabledScope->status(4)->count(); + $totalComponents = (clone $enabledScope)->count(); + $majorOutages = (clone $enabledScope)->status(4)->count(); $isMajorOutage = $totalComponents ? ($majorOutages / $totalComponents) >= 0.5 : false; // Default data