From 75362f33a0c5b0ba50c4ea9c530ae9c349992604 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 4 Jan 2010 21:06:20 +0100 Subject: [PATCH] Only interpolate action tag content when defined. This fixes a warning when using self-closing action tags. --- general/interpolate_fancy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.30.2