Skip to content

Commit 63b9d6f

Browse files
committed
fix: Fix error when parsing Aruba snmpwalk with CRLF EOL
1 parent a68df2b commit 63b9d6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/GLPI/Agent/SNMP/MibSupport/Aruba.pm

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ sub _this {
4545
if ($dot1qTpFdbStatus) {
4646
my ($subkey) = first {
4747
$dot1qTpFdbStatus->{$_} eq '4' } keys(%{$dot1qTpFdbStatus});
48-
my ($extracted) = $subkey =~ /^\d+\.(.*)$/;
49-
$self->{_this} = $extracted if $extracted;
48+
unless (empty($subkey)) {
49+
my ($extracted) = $subkey =~ /^\d+\.(.*)$/;
50+
$self->{_this} = $extracted unless empty($extracted);
51+
}
5052
}
5153
}
5254

0 commit comments

Comments
 (0)