mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Don't try redirecting to install.php if there is no install.php to redirect to.
This commit is contained in:
parent
5ad5dfc7ed
commit
75b16f6e1b
3
main.php
3
main.php
@ -107,6 +107,9 @@ require_once("model/DB.php");
|
||||
|
||||
// Redirect to the installer if no database is selected
|
||||
if(!isset($databaseConfig) || !isset($databaseConfig['database']) || !$databaseConfig['database']) {
|
||||
if(!file_exists(BASE_PATH . '/install.php')) {
|
||||
die('SilverStripe Framework requires a $databaseConfig defined.');
|
||||
}
|
||||
$s = (isset($_SERVER['SSL']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 's' : '';
|
||||
$installURL = "http$s://" . $_SERVER['HTTP_HOST'] . BASE_URL . '/install.php';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user