mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6088 from webbuilders-group/fix-windows-regression
BUGIX: Fix regression causing the admin to crash on windows due to FRAMEWORK_DIR being prefixed by a backslash
This commit is contained in:
commit
189ac2eed0
@ -226,7 +226,7 @@ define('THEMES_PATH', BASE_PATH . '/' . THEMES_DIR);
|
||||
|
||||
define('FRAMEWORK_PATH', realpath(__DIR__ . '/../'));
|
||||
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 . '/' : '';
|
||||
} else {
|
||||
throw new Exception("Path error: FRAMEWORK_PATH " . FRAMEWORK_PATH . " not within BASE_PATH " . BASE_PATH);
|
||||
|
Loading…
Reference in New Issue
Block a user