mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGIX: Fix regression causing the admin to crash on windows due to FRAMEWORK_DIR being prefixed by a backslash
This commit is contained in:
parent
ef966557d8
commit
ce91c3820e
@ -223,7 +223,7 @@ define('THEMES_PATH', BASE_PATH . '/' . THEMES_DIR);
|
|||||||
|
|
||||||
define('FRAMEWORK_PATH', realpath(__DIR__ . '/../'));
|
define('FRAMEWORK_PATH', realpath(__DIR__ . '/../'));
|
||||||
if(strpos(FRAMEWORK_PATH, BASE_PATH) === 0) {
|
if(strpos(FRAMEWORK_PATH, BASE_PATH) === 0) {
|
||||||
define('FRAMEWORK_DIR', trim(substr(FRAMEWORK_PATH, strlen(BASE_PATH)), '/'));
|
define('FRAMEWORK_DIR', trim(substr(FRAMEWORK_PATH, strlen(BASE_PATH)), DIRECTORY_SEPARATOR));
|
||||||
$frameworkDirSlashSuffix = FRAMEWORK_DIR ? FRAMEWORK_DIR . '/' : '';
|
$frameworkDirSlashSuffix = FRAMEWORK_DIR ? FRAMEWORK_DIR . '/' : '';
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Path error: FRAMEWORK_PATH " . FRAMEWORK_PATH . " not within BASE_PATH " . BASE_PATH);
|
throw new Exception("Path error: FRAMEWORK_PATH " . FRAMEWORK_PATH . " not within BASE_PATH " . BASE_PATH);
|
||||||
|
Loading…
Reference in New Issue
Block a user