From 2c8316b9f30ca3ab96b7e8acd1275253ae3e272f Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 18 Jan 2008 11:04:19 +0000 Subject: Bug 407402: Make Bugzilla die when data/params doesn't exist, if we're in a CGI. Patch By Max Kanat-Alexander r=justdave, a=mkanat --- Bugzilla/Config.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Bugzilla/Config.pm') diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index b1b0d6667..d84970e8c 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -318,6 +318,17 @@ sub read_param_file { # Now read the param back out from the sandbox %params = %{$s->varglob('param')}; } + elsif ($ENV{'SERVER_SOFTWARE'}) { + # We're in a CGI, but the params file doesn't exist. We can't + # Template Toolkit, or even install_string, since checksetup + # might not have thrown an error. Bugzilla::CGI->new + # hasn't even been called yet, so we manually use CGI::Carp here + # so that the user sees the error. + require CGI::Carp; + CGI::Carp->import('fatalsToBrowser'); + die "The $datadir/params file does not exist." + . ' You probably need to run checksetup.pl.', + } return \%params; } -- cgit v1.2.3-24-g4f1b