mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix array return value
Scrutinizer bug, reset() expects a reference.
This commit is contained in:
@@ -6,7 +6,8 @@ if (!empty($agent_data['app']['memcached'])) {
|
||||
$options = '-O qv';
|
||||
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.9.109.101.109.99.97.99.104.101.100';
|
||||
$result = snmp_get($device, $oid, $options);
|
||||
$data = reset(unserialize(str_replace("<<<app-memcached>>>\n", '', $result)));
|
||||
$result = unserialize(str_replace("<<<app-memcached>>>\n", '', $result));
|
||||
$data = $result[0];
|
||||
}
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-memcached-'.$app['app_id'].'.rrd';
|
||||
|
||||
Reference in New Issue
Block a user