Remove unwanted characters from poll info

Similar to PR 3883.

Removing carriage return character \r, causing the following error while trying view minigraphs on device list page:

SyntaxError: unterminated string literal

return overlib('<div style=\'background-color: #FFFFFF;\'><div><span class=
This issue has been experienced with S4810 devices.
This commit is contained in:
Ahmed Sajid
2016-07-28 16:21:33 -04:00
parent 1afd76681e
commit d7f24c6a5a

View File

@@ -17,7 +17,8 @@ if (preg_match('/Dell Networking N[1234].*/' , $temp_hardware) == 1) { // If De
$features = snmp_get($device, 'productIdentificationDescription.0', '-Ovq', 'Dell-Vendor-MIB'); $features = snmp_get($device, 'productIdentificationDescription.0', '-Ovq', 'Dell-Vendor-MIB');
} }
else { // Assume S-series else { // Assume S-series
list(,,$version,$hardware,,) = explode(PHP_EOL, $poll_device['sysDescr']); $sysDescr = preg_replace('/[\r]+/',' ', $poll_device['sysDescr']);
list(,,$version,$hardware,,) = explode(PHP_EOL, $sysDescr);
list(,$version) = explode(': ',$version); list(,$version) = explode(': ',$version);
list(,$hardware) = explode(': ',$hardware); list(,$hardware) = explode(': ',$hardware);
} }