mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Split is removed in PHP7, replace with explode as none were using it as a regex.
Also fix two array keys without quotes in include/syslog.php Fixes #2205
This commit is contained in:
@@ -34,7 +34,7 @@ foreach (dbFetchRows('SELECT * FROM `devices` AS D, `services` AS S WHERE S.devi
|
||||
$cmd = $config['nagios_plugins'] . "/check_" . $service['service_type'] . " -H " . ($service['service_ip'] ? $service['service_ip'] : $service['hostname']);
|
||||
$cmd .= " ".$service['service_param'];
|
||||
$check = shell_exec($cmd);
|
||||
list($check, $time) = split("\|", $check);
|
||||
list($check, $time) = explode("|", $check);
|
||||
if(stristr($check, "ok -")) {
|
||||
$status = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user