fix: Misc warning fixes in mib polling (#5222)

This commit is contained in:
Tony Murray
2016-12-22 05:03:21 -06:00
committed by Neil Lathwood
parent e49498b689
commit b3d07c3425
+3 -2
View File
@@ -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;
}
}