mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Work around alert with bad data (#16287)
Avoid trying to count null by making sure it is an array
This commit is contained in:
@@ -314,6 +314,7 @@ class RunAlerts
|
||||
$chk[$i]['ip'] = inet6_ntop($chk[$i]['ip']);
|
||||
}
|
||||
}
|
||||
$alert['details']['rule'] ??= []; // if details.rule is missing, set it to an empty array
|
||||
$o = count($alert['details']['rule']);
|
||||
$n = count($chk);
|
||||
$ret = 'Alert #' . $alert['id'];
|
||||
|
Reference in New Issue
Block a user