]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
improve fix to DTRT for a param of "0"
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 4 Aug 2008 18:58:21 +0000 (14:58 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 26 Aug 2008 16:19:01 +0000 (12:19 -0400)
(cherry picked from commit 6f2d1536b8ce0bd746c87c00466170435ddb3923)

IkiWiki.pm
debian/changelog

index e0793b5faa4c362a112cb86e9d6abd06544240b3..4de8f71d6ce60743de22d0ea9efaeeb875de5999 100644 (file)
@@ -718,7 +718,9 @@ sub preprocess ($$$;$$) { #{{{
                my $prefix=shift;
                my $command=shift;
                my $params=shift;
-               if (length $escape) {
+               $params="" if ! defined $params;
+
+               f (length $escape) {
                        return "[[$prefix$command $params]]";
                }
                elsif (exists $hooks{preprocess}{$command}) {
@@ -844,8 +846,7 @@ sub preprocess ($$$;$$) { #{{{
                }sx;
        }
 
-       # $4 can be undef if the directive was [[!foo]]
-       $content =~ s{$regex}{$handle->($1, $2, $3, ($4 or ""))}eg;
+       $content =~ s{$regex}{$handle->($1, $2, $3, $4)}eg;
        return $content;
 } #}}}
 
index adfa2c2f09eb6d41b475782b5ef169d618a2d197..e1a8be97fe40084070064bf06086bc921a1614cb 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (2.54) UNRELEASED; urgency=low
+
+  * Fix uninitialised value warning from a [[!foo]] preprocessor directive
+    with no whitespace.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 26 Aug 2008 12:18:36 -0400
+
 ikiwiki (2.53) unstable; urgency=low
 
   * search: generate configuration files once only when rebuilding