From 929d7ece563f9e7d23fce4e227c5bb6d551b2059 Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Wed, 28 Jun 2017 22:03:35 +0100 Subject: [PATCH] fix: Fixed checks for $entPhysicalIndex/$hrDeviceIndex being numeric (#6907) --- includes/discovery/functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 70138d908b..e92e989e44 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -676,11 +676,11 @@ function discover_mempool(&$valid, $device, $index, $type, $descr, $precision = 'mempool_total' => 0, ); - if (!empty($entPhysicalIndex)) { + if (is_numeric($entPhysicalIndex)) { $insert_data['entPhysicalIndex'] = $entPhysicalIndex; } - if (!empty($hrDeviceIndex)) { + if (is_numeric($hrDeviceIndex)) { $insert_data['hrDeviceIndex'] = $hrDeviceIndex; }