From 5762e655e101f56e577de179bdbb0307c9ca614f Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 23 Mar 2015 15:30:09 +0000 Subject: [PATCH] Updated for scrut issues --- html/includes/api_functions.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/includes/api_functions.inc.php b/html/includes/api_functions.inc.php index 6f6c7b2b7..014adb64c 100644 --- a/html/includes/api_functions.inc.php +++ b/html/includes/api_functions.inc.php @@ -666,7 +666,6 @@ function get_inventory() { $router = $app->router()->getCurrentRoute()->getParams(); $status = 'error'; $err_msg = ''; - $message = ''; $code = 500; $hostname = $router['hostname']; // use hostname as device_id if it's all digits @@ -685,6 +684,8 @@ function get_inventory() { } if (!is_numeric($device_id)) { $err_msg = 'Invalid device provided'; + $total_inv = 0; + $inventory = array(); } else { $inventory = dbFetchRows("SELECT * FROM `entPhysical` WHERE 1 $sql",$params); $code = 200;