]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Suppress warning about uninitialized value if directives look like [[!foo]]
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 3 Aug 2008 15:16:24 +0000 (16:16 +0100)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 26 Aug 2008 16:17:27 +0000 (12:17 -0400)
(cherry picked from commit cf58eefaa56eb17c227d97d129bf95e3dab54fd3)
(cherry picked from commit 4c2f46e3fa34238bbdd093f0b3d211103a3b94a3)

IkiWiki.pm

index 5a05a0f73ddf68e8bb624ac7ca74d2965dab9277..e0793b5faa4c362a112cb86e9d6abd06544240b3 100644 (file)
@@ -844,7 +844,8 @@ sub preprocess ($$$;$$) { #{{{
                }sx;
        }
 
-       $content =~ s{$regex}{$handle->($1, $2, $3, $4)}eg;
+       # $4 can be undef if the directive was [[!foo]]
+       $content =~ s{$regex}{$handle->($1, $2, $3, ($4 or ""))}eg;
        return $content;
 } #}}}