mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02: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:
+2
-2
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user