From: Matthijs Kooijman Date: Mon, 4 Jan 2010 20:06:20 +0000 (+0100) Subject: Only interpolate action tag content when defined. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Finterpolate_fancy;p=matthijs%2Fupstream%2Fblosxom-plugins.git Only interpolate action tag content when defined. This fixes a warning when using self-closing action tags. --- diff --git a/general/interpolate_fancy b/general/interpolate_fancy index 45208d2..9eaf045 100644 --- a/general/interpolate_fancy +++ b/general/interpolate_fancy @@ -176,7 +176,9 @@ sub _action { my($plugin, $action, $attr, $content) = @_; my $result; - $content =~ s#<\@((?:\w|::)+?)\.(\w+?)\s+?(.+?)?(?:>(.*?)<\/\@\1\.\2>|\s+?\/>)#&interpolate_fancy::_action($1,$2,$3,$4)#gse; + if (defined $content) { + $content =~ s#<\@((?:\w|::)+?)\.(\w+?)\s+?(.+?)?(?:>(.*?)<\/\@\1\.\2>|\s+?\/>)#&interpolate_fancy::_action($1,$2,$3,$4)#gse; + } my $attributes = interpolate_fancy::_attributes($attr);