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:
Tony Murray
2016-02-25 14:30:40 -06:00
parent d9dcebb878
commit 9f22b18dc8
25 changed files with 26 additions and 26 deletions

View File

@@ -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;
}