make sure value is defined before using it as an array

master
Joey Hess 2008-12-31 00:08:46 -05:00
parent 47fc59c584
commit 0daa4eb521
1 changed files with 2 additions and 1 deletions

View File

@ -138,7 +138,8 @@ sub showfields ($$$@) {
my $value=$config{$key};
if ($info{safe} && (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) {
if ($info{safe} && defined $value &&
(ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) {
$value=[@{$value}, "", ""]; # blank items for expansion
}