From: reed%reedloden.com <> Date: Wed, 18 Nov 2009 18:25:45 +0000 (+0000) Subject: Bug 360626 - "ThrowTemplateError() used in Util.pm" [p=reed r=LpSolit a=LpSolit] X-Git-Tag: bugzilla-3.4.4~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d62274e8d42ffaf53e1b7f2bf1d36358f8bbe7cd;p=thirdparty%2Fbugzilla.git Bug 360626 - "ThrowTemplateError() used in Util.pm" [p=reed r=LpSolit a=LpSolit] --- diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index b3d5b0eaad..2ffd3efeb2 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -600,8 +600,10 @@ sub get_text { $vars ||= {}; $vars->{'message'} = $name; my $message; - $template->process('global/message.txt.tmpl', $vars, \$message) - || ThrowTemplateError($template->error()); + if (!$template->process('global/message.txt.tmpl', $vars, \$message)) { + require Bugzilla::Error; + Bugzilla::Error::ThrowTemplateError($template->error()); + } # Remove the indenting that exists in messages.html.tmpl. $message =~ s/^ //gm; return $message;