mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated for scrut issues
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user