mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
more isset() from stintel
git-svn-id: http://www.observium.org/svn/observer/trunk@2251 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -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'])); }
|
||||
|
@ -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']])
|
||||
{
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user