Subject: | Remove warning about undefined value |
This patch removes a warning about undefined values in Radius.pm
Subject: | Authen-Radius_remove_warning.diff |
diff -rupN Authen-Radius-0.20_old/Radius.pm Authen-Radius-0.20/Radius.pm
--- Authen-Radius-0.20_old/Radius.pm 2012-03-18 20:17:49.313819745 +0100
+++ Authen-Radius-0.20/Radius.pm 2012-03-18 20:18:20.054569761 +0100
@@ -429,7 +429,7 @@ sub vendorID ($) {
} else {
# look up vendor by attribute name
my $vendor_name = $dict_name{$attr->{'Name'}}{'vendor'};
- my $vendor_id = defined ($dict_vendor_name{$vendor_name}{'id'}) ?
+ my $vendor_id = (defined $vendor_name && defined ($dict_vendor_name{$vendor_name}{'id'})) ?
$dict_vendor_name{$vendor_name}{'id'} : 'not defined';
return $vendor_id;
}