Tony Murray 9f22b18dc8 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
2016-02-25 14:34:06 -06:00

7 lines
252 B
PHP

<?php
$sensor_value = trim(str_replace('"', '', snmp_get($device, $sensor['sensor_oid'], '-OUqnv', '')));
preg_match_all('/([0-9]+C)+/', $sensor_value, $temps);
list(,$index) = explode('.', $sensor['sensor_index']);
$sensor_value = $temps[0][$index];