Merge branch '4.8' into 4

This commit is contained in:
Maxime Rainville 2021-08-26 16:58:09 +12:00
commit 02c9736e23

View File

@ -58,9 +58,10 @@ if (!defined('BASE_PATH')) {
}
}
// Determine BASE_PATH by assuming that this file is framework/src/Core/Constants.php
// we can then determine the base path
$candidateBasePath = rtrim(dirname(dirname(dirname(__DIR__))), DIRECTORY_SEPARATOR);
// Determine BASE_PATH by assuming that this file is vendor/silverstripe/framework/src/includes/constants.php
// we can then determine the base path
$candidateBasePath = rtrim(dirname(__DIR__, 5), DIRECTORY_SEPARATOR);
// We can't have an empty BASE_PATH. Making it / means that double-slashes occur in places but that's benign.
// This likely only happens on chrooted environemnts
return $candidateBasePath ?: DIRECTORY_SEPARATOR;