BUGIX: Fix regression causing the admin to crash on windows due to FRAMEWORK_DIR being prefixed by a backslash

This commit is contained in:
UndefinedOffset 2016-09-26 09:46:00 -03:00
parent ef966557d8
commit ce91c3820e

View File

@ -223,7 +223,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);