From 22d395ee10f81ecc43ca07e2d0654c158723d05b Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sun, 6 Jan 2008 08:53:44 +0000 Subject: Bug 407420: CGI::Carp fatalsToBrowser should happen as early as possible Patch By Max Kanat-Alexander r=justdave, a=mkanat --- Bugzilla.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 075031482..c77c039ce 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -26,6 +26,15 @@ package Bugzilla; use strict; +# We want any compile errors to get to the browser, if possible. +BEGIN { + # This makes sure we're in a CGI. + if ($ENV{SERVER_SOFTWARE} && !$ENV{MOD_PERL}) { + require CGI::Carp; + CGI::Carp->import('fatalsToBrowser'); + } +} + use Bugzilla::Config; use Bugzilla::Constants; use Bugzilla::Auth; -- cgit v1.2.3-24-g4f1b