Bug 300978: bad output when a non-cgi script dies

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
This commit is contained in:
mkanat%bugzilla.org 2006-07-25 23:22:03 +00:00
parent 2711b61c3c
commit 7d0c48b8f1
2 changed files with 5 additions and 3 deletions

View File

@ -30,8 +30,6 @@ package Bugzilla::Bug;
use strict;
use CGI::Carp qw(fatalsToBrowser);
use Bugzilla::Attachment;
use Bugzilla::Constants;
use Bugzilla::Field;

View File

@ -36,7 +36,6 @@ BEGIN {
use CGI qw(-no_xhtml -oldstyle_urls :private_tempfiles :unique_headers SERVER_PUSH);
use base qw(CGI);
use CGI::Carp qw(fatalsToBrowser);
use Bugzilla::Error;
use Bugzilla::Util;
@ -62,6 +61,11 @@ sub new {
my $self = $class->SUPER::new(@args);
# This happens here so that command-line scripts don't spit out
# their errors in HTML format.
require CGI::Carp;
import CGI::Carp qw(fatalsToBrowser);
# Make sure our outgoing cookie list is empty on each invocation
$self->{Bugzilla_cookie_list} = [];