make sure value is defined before using it as an array
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 31 Dec 2008 05:08:46 +0000 (00:08 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 31 Dec 2008 05:08:46 +0000 (00:08 -0500)
IkiWiki/Plugin/websetup.pm

index a47c2997611a492b6c6f0050dd91750c15a3a4c9..2d978c5b46758e3ad2234f4d0bc8ba73d80e89b1 100644 (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
                }