mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Add HTTP status code for $databaseConfig error (fixes #3392)
This commit is contained in:
parent
17bdc2dea1
commit
b27cd73cb9
1
main.php
1
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' : '';
|
||||
|
Loading…
Reference in New Issue
Block a user