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:
Loz Calver 2016-09-26 16:00:16 +01:00 committed by GitHub
commit 189ac2eed0

View File

@ -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);