From 7e483f6bd22b717199eb0a00e1b980659fa1f62c Mon Sep 17 00:00:00 2001 From: laf Date: Sat, 27 Feb 2016 11:51:31 +0000 Subject: [PATCH] Added check if that value is set --- includes/alerts.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/alerts.inc.php b/includes/alerts.inc.php index 8080703dfa..684426f4d5 100644 --- a/includes/alerts.inc.php +++ b/includes/alerts.inc.php @@ -232,7 +232,9 @@ function RunRules($device) { $chk = dbFetchRow("SELECT state FROM alerts WHERE rule_id = ? && device_id = ? ORDER BY id DESC LIMIT 1", array($rule['id'], $device)); $sql = GenSQL($rule['rule']); $qry = dbFetchRows($sql,array($device)); - $qry[0]['ip'] = inet6_ntop($qry[0]['ip']); + if (isset($qry[0]['ip'])) { + $qry[0]['ip'] = inet6_ntop($qry[0]['ip']); + } $s = sizeof($qry); if( $s == 0 && $inv === false ) { $doalert = false;