From b3d07c34250a26df46b3a513b963da628ee4b0b8 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 22 Dec 2016 05:03:21 -0600 Subject: [PATCH] fix: Misc warning fixes in mib polling (#5222) --- includes/common.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/common.php b/includes/common.php index 4bf3779ea8..e1c67c9cd9 100644 --- a/includes/common.php +++ b/includes/common.php @@ -693,7 +693,8 @@ function c_echo($string, $enabled = true) function is_mib_graph($type, $subtype) { global $config; - return $config['graph_types'][$type][$subtype]['section'] == 'mib'; + return isset($config['graph_types'][$type][$subtype]['section']) && + $config['graph_types'][$type][$subtype]['section'] == 'mib'; } // is_mib_graph @@ -747,7 +748,7 @@ function get_graph_subtypes($type, $device = null) foreach ($config['graph_types'] as $type => $unused1) { foreach ($config['graph_types'][$type] as $subtype => $unused2) { - if (is_mib_graph($type, $subtype) && in_array($graphs, $subtype)) { + if (is_mib_graph($type, $subtype) && in_array($subtype, $graphs)) { $types[] = $subtype; } }