From e26498ad9182036543b133cb76870d83b1f4d849 Mon Sep 17 00:00:00 2001 From: tamirhad <46893693+tamirhad@users.noreply.github.com> Date: Fri, 5 Jun 2020 04:36:43 +0300 Subject: [PATCH] Fix performance issue in loadbalancers module (#11771) * Update Component.php * wrong quotes Co-authored-by: Tony Murray --- LibreNMS/Component.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LibreNMS/Component.php b/LibreNMS/Component.php index 7975e83276..629dd49688 100644 --- a/LibreNMS/Component.php +++ b/LibreNMS/Component.php @@ -219,10 +219,11 @@ class Component ->with('prefs') ->get() ->each(function (\App\Models\Component $component) use ($updated) { - unset($updated[$component->id]['type']); // can't change type + $update = $updated[$component->id]; + unset($update['type']); // can't change type // update component attributes - $component->fill($updated[$component->id]); + $component->fill($update); if ($component->isDirty()) { // Log the update to the Eventlog. $message = "Component $component->id has been modified: ";