Skip to content

Commit

Permalink
Add HTTP status code for $databaseConfig error (fixes silverstripe#3392)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinglozzer committed Aug 18, 2014
1 parent 17bdc2d commit b27cd73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
// 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' : '';
Expand Down

0 comments on commit b27cd73

Please sign in to comment.