Suppress warning about uninitialized value if directives look like [[!foo]]
[ikiwiki.git] / IkiWiki.pm
index 2815a5c4cff663cbf6ab71b0e5ec970e1db7305c..051c11b43c2633a66bee8aa9a4f11b1c7ed24fc9 100644 (file)
@@ -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;
 } #}}}