From 88118a5d75b18b8ee0c315cf55de2ab167563bc1 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Tue, 12 Dec 2023 08:40:42 -0500 Subject: [PATCH] QA: Additional fixing on #5609 This will add a subsequent check when the XML is damaged to allow the device to be created. --- lib/data_query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/data_query.php b/lib/data_query.php index 7ed34850ad..cad0982e8a 100644 --- a/lib/data_query.php +++ b/lib/data_query.php @@ -2380,7 +2380,7 @@ function verify_index_order($raw_xml) { /* list each of the input fields for this snmp query */ foreach ($raw_xml['fields'] as $field_name => $field_array) { - if (isset($field_array['direction'])) { + if (is_array($field_array) && isset($field_array['direction'])) { if ($field_array['direction'] == 'input' || $field_array['direction'] == 'input-output') { /* create a list of all values for this index */ array_push($xml_inputs, $field_name);