summaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-26 08:22:03 +0200
committermkanat%bugzilla.org <>2006-07-26 08:22:03 +0200
commit90407fca1556257552fdff05703e46d3b8f504e1 (patch)
tree696b8d48eb1afdd12d55ad81db86666b313480a4 /Bugzilla/CGI.pm
parent9334d6db0c9982de74c9f8bcb572f945fcca4cb4 (diff)
downloadbugzilla-90407fca1556257552fdff05703e46d3b8f504e1.tar.gz
bugzilla-90407fca1556257552fdff05703e46d3b8f504e1.tar.xz
Bug 300978: bad output when a non-cgi script dies
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r--Bugzilla/CGI.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index dd6061346..51c263472 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -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} = [];