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:34:06 -06:00
parent d9dcebb878
commit 9f22b18dc8
25 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -58,9 +58,9 @@ function process_syslog($entry, $update) {
// $entry['program'] = $matches['program'];
// }
// unset($matches);
if (strstr($entry[msg], '%')) {
if (strstr($entry['msg'], '%')) {
$entry['msg'] = preg_replace('/^%(.+?):\ /', '\\1||', $entry['msg']);
list(,$entry[msg]) = split(': %', $entry['msg']);
list(,$entry['msg']) = explode(': %', $entry['msg']);
$entry['msg'] = '%'.$entry['msg'];
$entry['msg'] = preg_replace('/^%(.+?):\ /', '\\1||', $entry['msg']);
}