From: joey Date: Sat, 22 Sep 2007 17:55:32 +0000 (+0000) Subject: $common_prefix may never get defined X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/a0f55abe072d19b623c65e74f2ede905d4c3f997 $common_prefix may never get defined --- diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 93ff3194a..65a6ed552 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -45,7 +45,8 @@ sub preprocess (@) { #{{{ } # Common prefix should not be a page in the map. - while (length $common_prefix && exists $mapitems{$common_prefix}) { + while (defined $common_prefix && length $common_prefix && + exists $mapitems{$common_prefix}) { $common_prefix=IkiWiki::dirname($common_prefix); } @@ -62,7 +63,8 @@ sub preprocess (@) { #{{{ my $openli=0; my $map = "
\n