summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Error.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2016-11-12 17:41:08 +0100
committerDylan William Hardison <dylan@hardison.net>2016-11-12 17:41:20 +0100
commit874e96c2423c772564c9dc63254baa99e86f270b (patch)
tree21e396b52b8fa54a3da946b90f5242992e660aee /Bugzilla/Error.pm
parent085878323cb82810bc2cd3f00ce925bb49c70156 (diff)
downloadbugzilla-874e96c2423c772564c9dc63254baa99e86f270b.tar.gz
bugzilla-874e96c2423c772564c9dc63254baa99e86f270b.tar.xz
Bug 1314201 - ThrowUserError and ThrowCodeError should print headers if headers have not already been printed
Diffstat (limited to 'Bugzilla/Error.pm')
-rw-r--r--Bugzilla/Error.pm4
1 files changed, 2 insertions, 2 deletions
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;