From e2abd5ed60c1c83dfc75592fb217c432c3af73df Mon Sep 17 00:00:00 2001 From: laf Date: Tue, 1 Nov 2016 00:05:53 +0000 Subject: [PATCH] fix: only update components if data exists in cimc entity-physical discovery --- includes/discovery/entity-physical/cimc.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/discovery/entity-physical/cimc.inc.php b/includes/discovery/entity-physical/cimc.inc.php index ae3f7e14ef..6b08cffef1 100644 --- a/includes/discovery/entity-physical/cimc.inc.php +++ b/includes/discovery/entity-physical/cimc.inc.php @@ -590,7 +590,9 @@ if (is_null($tblUCSObjects)) { $component->deleteComponent($key); } } - // Write the Components back to the DB. - $component->setComponentPrefs($device['device_id'], $components); - echo "\n"; + if (is_array($components)) { + // Write the Components back to the DB. + $component->setComponentPrefs($device['device_id'], $components); + echo "\n"; + } } // End if not error