mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '4.8' into 4
This commit is contained in:
commit
02c9736e23
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user