diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php
index ad4df7734..66bfe70a0 100644
--- a/html/includes/functions.inc.php
+++ b/html/includes/functions.inc.php
@@ -26,7 +26,7 @@ function generate_device_link($device, $text=0, $linksuffix="", $start=0, $end=0
{
$graphs = $config['os'][$device['os']]['over'];
}
- elseif (isset($config['os'][$device['os_group']]['over']))
+ elseif (isset($device['os_group']) && isset($config['os'][$device['os_group']]['over']))
{
$graphs = $config['os'][$device['os_group']]['over'];
}
@@ -244,7 +244,7 @@ function generate_port_link($args, $text = NULL, $type = NULL)
$args = ifNameDescr($args);
if (!$text) { $text = fixIfName($args['label']); }
if ($type) { $args['graph_type'] = $type; }
- if (!$args['graph_type']) { $args['graph_type'] = 'port_bits'; }
+ if (!isset($args['graph_type'])) { $args['graph_type'] = 'port_bits'; }
$class = ifclass($args['ifOperStatus'], $args['ifAdminStatus']);
if (!isset($args['hostname'])) { $args = array_merge($args, device_by_id_cache($args['device_id'])); }
diff --git a/html/index.php b/html/index.php
index 5cd429081..57f2bcec7 100755
--- a/html/index.php
+++ b/html/index.php
@@ -33,7 +33,7 @@ $month = time() - (31 * 24 * 60 * 60);
$year = time() - (365 * 24 * 60 * 60);
# Load the settings for Multi-Tenancy.
-if (is_array($config['branding']))
+if (isset($config['branding']) && is_array($config['branding']))
{
if ($config['branding'][$_SERVER['SERVER_NAME']])
{
diff --git a/includes/common.php b/includes/common.php
index 2dc3d42bb..649cad106 100644
--- a/includes/common.php
+++ b/includes/common.php
@@ -100,7 +100,7 @@ function device_by_id_cache($device_id)
{
global $device_cache;
- if (is_array($device_cache[$device_id]))
+ if (isset($device_cache[$device_id]) && is_array($device_cache[$device_id]))
{
$device = $device_cache[$device_id];
} else {