]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Setup.pm
Add missing plugin section, and deal with missing sections with a warning.
[ikiwiki.git] / IkiWiki / Setup.pm
index 48f3d4634da0371f988ba16ae1107849fcd24172..881e8a9d5960e9cad891b6b160de636bed03a3a9 100644 (file)
@@ -223,6 +223,10 @@ sub commented_dump ($$) {
                my $setup=$pair->[1];
                my %s=@{$setup};
                my $section=$s{plugin}->{section};
+               if (! defined $section) {
+                       print STDERR "warning: missing section in $plugin\n";
+                       $section="other";
+               }
                push @{$section_plugins{$section}}, $plugin;
                if (@{$section_plugins{$section}} == 1) {
                        push @ret, "", $indent.("#" x 70), "$indent# $section plugins",