From 613391ca8fa838398c4873389eb52ad891bd3a4b Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Tue, 16 Dec 2014 20:58:31 +0000 Subject: [PATCH] Scrutinizer issues fixed --- html/includes/api_functions.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html/includes/api_functions.inc.php b/html/includes/api_functions.inc.php index b5d511aa8..f60990b08 100644 --- a/html/includes/api_functions.inc.php +++ b/html/includes/api_functions.inc.php @@ -499,6 +499,8 @@ function list_alert_rules() { global $config; $app = \Slim\Slim::getInstance(); $router = $app->router()->getCurrentRoute()->getParams(); + $sql = ''; + $param = array(); if(isset($router['id']) && $router['id'] > 0) { $rule_id = mres($router['id']); $sql = "WHERE id=?"; @@ -521,6 +523,7 @@ function list_alerts() { } else { $param = array('1'); } + $sql = ''; if(isset($router['id']) && $router['id'] > 0) { $alert_id = mres($router['id']); $sql = "AND id=?"; @@ -607,6 +610,7 @@ function delete_rule() { $rule_id = mres($router['id']); $status = 'error'; $err_msg = ''; + $message = ''; $code = 500; if(is_numeric($rule_id)) { $status = 'ok'; @@ -632,6 +636,7 @@ function ack_alert() { $alert_id = mres($router['id']); $status = 'error'; $err_msg = ''; + $message = ''; $code = 500; if(is_numeric($alert_id)) { $status = 'ok';