From af0bf1fd5b9cb1316d6e34bff0ed41061e14443d Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 9 Dec 2015 16:55:58 -0800 Subject: deal when Net::MAC::Vendor-lookup doesn't return an arrayref, RT#39384 --- httemplate/view/elements/svc_Common.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/view/elements/svc_Common.html') diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index d7a1dcf30..296c27bbc 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -283,8 +283,8 @@ my $format_field = sub { } elsif ( $type eq 'checkbox' ) { $value = $value eq 'Y' ? emt('Yes') : emt('No'); } elsif ( $type =~ /(input-)?mac_addr/ and $value =~ /\w/) { - my $vendor = Net::MAC::Vendor::lookup($value)->[0]; - $value .= " ($vendor)" if $vendor; + my $vendor = Net::MAC::Vendor::lookup($value); + $value .= ' ('. $vendor->[0]. ')' if $vendor; $value = $m->scomp('/elements/mac_addr.html', $value); } -- cgit v1.2.1