Skip to content

Commit

Permalink
SnmpResponse filterBadLines fix (#14306)
Browse files Browse the repository at this point in the history
Actually filter lines (instead of full responses) with No Such Instance regex
  • Loading branch information
murrant committed Sep 6, 2022
1 parent 3f27d89 commit 69d1c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LibreNMS/Data/Source/SnmpResponse.php
Expand Up @@ -227,7 +227,7 @@ public function getExitCode(): int
*/
public function filterBadLines(): SnmpResponse
{
$this->raw = preg_replace('/^.*No Such Instance currently exists.*$/', '', $this->raw);
$this->raw = preg_replace('/^.*No Such Instance currently exists.*$/m', '', $this->raw);
$this->raw = preg_replace('/\n[^\r\n]+No more variables left[^\r\n]+$/s', '', $this->raw);

return $this;
Expand Down

0 comments on commit 69d1c20

Please sign in to comment.