From 265906b44c0689ba07faf55f854a2ae55df74f9a Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Sat, 22 Apr 2023 10:37:20 -0500 Subject: [PATCH] Fix some undefined constants (#14993) * Fix undefined constants These have been broken for a long time. Likely they are unused. * Fix undefined constants These have been broken for a long time. Likely they are unused. --- includes/discovery/storage/hikvision-nvr.inc.php | 2 +- includes/html/graphs/application/cape_anti_issues.inc.php | 2 +- includes/html/graphs/application/cape_malscore.inc.php | 2 +- includes/html/pages/device/apps/hv-monitor.inc.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/discovery/storage/hikvision-nvr.inc.php b/includes/discovery/storage/hikvision-nvr.inc.php index 8634e8aff1..19bac286b7 100644 --- a/includes/discovery/storage/hikvision-nvr.inc.php +++ b/includes/discovery/storage/hikvision-nvr.inc.php @@ -30,5 +30,5 @@ if ($device['os'] === 'hikvision-nvr') { $type = 'hikvision-nvr'; $descr = 'Storage'; $mib = 'HIKVISION-MIB'; - discover_storage($valid_storage, $device, $index, $type, $mib, $descr, 0, size, null); + discover_storage($valid_storage, $device, $index, $type, $mib, $descr, 0, 'size', null); } diff --git a/includes/html/graphs/application/cape_anti_issues.inc.php b/includes/html/graphs/application/cape_anti_issues.inc.php index c210d95208..501ec40f65 100644 --- a/includes/html/graphs/application/cape_anti_issues.inc.php +++ b/includes/html/graphs/application/cape_anti_issues.inc.php @@ -51,7 +51,7 @@ if (Rrd::checkRrdExists($rrd_filename)) { 'descr' => 'Mode', 'ds' => 's5anti_issues', ]; - if ($vars['stddev'] == on) { + if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, 'descr' => 'StdDev', diff --git a/includes/html/graphs/application/cape_malscore.inc.php b/includes/html/graphs/application/cape_malscore.inc.php index a3af68358f..bfd5448ac3 100644 --- a/includes/html/graphs/application/cape_malscore.inc.php +++ b/includes/html/graphs/application/cape_malscore.inc.php @@ -51,7 +51,7 @@ if (Rrd::checkRrdExists($rrd_filename)) { 'descr' => 'Mode', 'ds' => 's5malscore', ]; - if ($vars['stddev'] == on) { + if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, 'descr' => 'StdDev', diff --git a/includes/html/pages/device/apps/hv-monitor.inc.php b/includes/html/pages/device/apps/hv-monitor.inc.php index d990f9dc55..c8622778fb 100644 --- a/includes/html/pages/device/apps/hv-monitor.inc.php +++ b/includes/html/pages/device/apps/hv-monitor.inc.php @@ -97,7 +97,7 @@ if (isset($vars['vmif']) and isset($vars['vm'])) { 'MAC: ' . $mac; if (isset($port) && isset($mac) && $mac != '') { echo ' (' . - generate_device_link([device_id=>$port->device_id]) . + generate_device_link(['device_id'=>$port->device_id]) . ', ' . generate_port_link([ 'label' => $port->label,