Skip to content

Commit

Permalink
allow null or string for ifName, preg_match is fine with it
Browse files Browse the repository at this point in the history
  • Loading branch information
PipoCanaja committed Jan 3, 2025
1 parent bbf682e commit 80f8e8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LibreNMS/OS/Junos.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function discoverTransceivers(): Collection
});
}

private function findTransceiverEntityByPortName(array $entPhysical, string $ifName): array
private function findTransceiverEntityByPortName(array $entPhysical, ?string $ifName): array
{
if (preg_match('#-(\d+/\d+/\d+)#', $ifName, $matches)) {
$expected_tail = ' @ ' . $matches[1];
Expand Down

0 comments on commit 80f8e8e

Please sign in to comment.