Commit 027bc25b authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

fix passing arrays, hashes and code into templates

It was always intention to make XXX => [...] arguments
to $template->Parse method to be available in template's
code as @XXX, but it was broken.

This is a fix, not a backwards incompatible change, as we
have GnuPG errors notification templates that rely on
such behavior.
parent 421e35d1
......@@ -457,7 +457,7 @@ sub _ParseContentPerl {
foreach my $key ( keys %{ $args{TemplateArgs} } ) {
my $val = $args{TemplateArgs}{ $key };
next unless ref $val;
next if ref $val =~ /^(ARRAY|HASH|SCALAR|CODE)$/;
next if ref($val) =~ /^(ARRAY|HASH|SCALAR|CODE)$/;
$args{TemplateArgs}{ $key } = \$val;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment