From b27cd73cb97c5a2bfdc7100e5862b48f7ec47ba3 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Mon, 18 Aug 2014 09:12:26 +0100 Subject: [PATCH] Add HTTP status code for $databaseConfig error (fixes #3392) --- main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/main.php b/main.php index 9f10da239..e294530cb 100644 --- a/main.php +++ b/main.php @@ -158,6 +158,7 @@ global $databaseConfig; // Redirect to the installer if no database is selected if(!isset($databaseConfig) || !isset($databaseConfig['database']) || !$databaseConfig['database']) { if(!file_exists(BASE_PATH . '/install.php')) { + header($_SERVER['SERVER_PROTOCOL'] . " 500 Server Error"); die('SilverStripe Framework requires a $databaseConfig defined.'); } $s = (isset($_SERVER['SSL']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 's' : '';