Only interpolate action tag content when defined. interpolate_fancy
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 4 Jan 2010 20:06:20 +0000 (21:06 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 4 Jan 2010 20:06:20 +0000 (21:06 +0100)
This fixes a warning when using self-closing action tags.

general/interpolate_fancy

index 45208d24d77feec491916c5cbce68f8144aee2bf..9eaf045219c4fef24b400a5630130ebddb2d9471 100644 (file)
@@ -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);