mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed crash when BASE_PATH is set by assuming the location of Constants.php
This commit is contained in:
parent
857caa8fff
commit
f18ef75c3d
@ -188,10 +188,10 @@ if(!defined('BASE_PATH')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine BASE_PATH by assuming that this file is framework/core/Core.php
|
// Determine BASE_PATH by assuming that this file is framework/src/Core/Constants.php
|
||||||
if(!defined('BASE_PATH')) {
|
if(!defined('BASE_PATH')) {
|
||||||
// we can then determine the base path
|
// we can then determine the base path
|
||||||
$candidateBasePath = rtrim(dirname(dirname(dirname(__FILE__))), DIRECTORY_SEPARATOR);
|
$candidateBasePath = rtrim(dirname(dirname(dirname(dirname(__FILE__)))), DIRECTORY_SEPARATOR);
|
||||||
// We can't have an empty BASE_PATH. Making it / means that double-slashes occur in places but that's benign.
|
// 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
|
// This likely only happens on chrooted environemnts
|
||||||
if($candidateBasePath == '') $candidateBasePath = DIRECTORY_SEPARATOR;
|
if($candidateBasePath == '') $candidateBasePath = DIRECTORY_SEPARATOR;
|
||||||
|
Loading…
Reference in New Issue
Block a user