From 874e96c2423c772564c9dc63254baa99e86f270b Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sat, 12 Nov 2016 11:41:08 -0500 Subject: Bug 1314201 - ThrowUserError and ThrowCodeError should print headers if headers have not already been printed --- Bugzilla/Error.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Error.pm') diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index fc0e4812e..226078f9c 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -112,7 +112,7 @@ sub _throw_error { } my $cgi = Bugzilla->cgi; - $cgi->close_standby_message('text/html', 'inline', 'error', 'html'); + $cgi->close_standby_message('text/html', 'inline', 'error', 'html') unless $cgi->sent_headers; $template->process($name, $vars) || ThrowTemplateError($template->error()); print $cgi->multipart_final() if $cgi->{_multipart_in_progress}; @@ -279,7 +279,7 @@ sub ThrowErrorPage { my $template = Bugzilla->template; my $vars = {}; $vars->{message} = $message; - print $cgi->header(); + print $cgi->header() unless $cgi->sent_headers(); $template->process($template_name, $vars) || ThrowTemplateError($template->error()); exit; -- cgit v1.2.3-24-g4f1b