]> sipb.mit.edu Git - ikiwiki.git/commitdiff
underlay: Avoid crashing if lists of underlays (or template directories) are not...
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 7 Nov 2009 17:36:13 +0000 (12:36 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 7 Nov 2009 17:36:13 +0000 (12:36 -0500)
IkiWiki/Plugin/underlay.pm
debian/changelog

index 51b7693334aa6a02448c3bcd8663ccb438fc1e01..116fe7324e5d3b4a770acd6876067eb020cf4ae8 100644 (file)
@@ -38,10 +38,14 @@ sub getsetup () {
 }
 
 sub checkconfig () {
-       foreach my $dir (@{$config{add_underlays}}) {
-               add_underlay($dir);
+       if ($config{add_underlays}) {
+               foreach my $dir (@{$config{add_underlays}}) {
+                       add_underlay($dir);
+               }
+       }
+       if ($config{add_templates}) {
+               push @{$config{templatedirs}}, @{$config{add_templates}};
        }
-       push @{$config{templatedirs}}, @{$config{add_templates}};
 }
 
 1;
index f4132cb463b100f7ad61c0a12074aaade7f099d0..0026d9ddc8a5befb0824523efda4d312019ec812 100644 (file)
@@ -2,6 +2,8 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low
 
   * underlay: Fix example values put in setup file to be array
     references.
+  * underlay: Avoid crashing if lists of underlays (or template
+    directories) are not configured.
 
  -- Joey Hess <joeyh@debian.org>  Fri, 06 Nov 2009 12:04:29 -0500