summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-08-03 16:16:24 +0100
committerJoey Hess <joey@kodama.kitenet.net>2008-08-04 14:56:23 -0400
commit4c2f46e3fa34238bbdd093f0b3d211103a3b94a3 (patch)
treeb2e330385d5f70009cb0935d514eb652a87ad336
parente48f8ff8a9d492f1583b05d80ed4a6ec88050108 (diff)
Suppress warning about uninitialized value if directives look like [[!foo]]
(cherry picked from commit cf58eefaa56eb17c227d97d129bf95e3dab54fd3)
-rw-r--r--IkiWiki.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 2815a5c4c..051c11b43 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1176,7 +1176,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;
} #}}}