From b8b57b2c41fd39d4c4791699759d2b68a3a2215a Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 10 Apr 2012 21:09:28 +0800 Subject: Bug 739153: fix infinite recursion in error handler --- Bugzilla/Error.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Error.pm') diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index c2fcfdd55..df03dfd6d 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -192,11 +192,16 @@ sub ThrowTemplateError { die("error: template error: $template_err"); } + # mod_perl overrides exit to call die with this string + # we never want to display this to the user + exit if $template_err =~ /\bModPerl::Util::exit\b/; + $vars->{'template_error_msg'} = $template_err; $vars->{'error'} = "template_error"; $vars->{'uid'} = arecibo_generate_id(); arecibo_handle_error('error', $template_err, $vars->{'uid'}); + $vars->{'template_error_msg'} =~ s/ at \S+ line \d+\.\s*$//; my $template = Bugzilla->template; -- cgit v1.2.3-24-g4f1b