mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Added brackets around strpos() check just to be sure it works
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98898 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
628cca92ba
commit
8a0a0b3263
@ -134,7 +134,7 @@ if(!defined('BASE_URL')) {
|
|||||||
// If that didn't work, failover to the old syntax. Hopefully this isn't necessary, and maybe
|
// If that didn't work, failover to the old syntax. Hopefully this isn't necessary, and maybe
|
||||||
// if can be phased out?
|
// if can be phased out?
|
||||||
if(!defined('BASE_URL')) {
|
if(!defined('BASE_URL')) {
|
||||||
$dir = strpos($_SERVER['SCRIPT_NAME'], 'index.php') !== false
|
$dir = (strpos($_SERVER['SCRIPT_NAME'], 'index.php') !== false)
|
||||||
? dirname($_SERVER['SCRIPT_NAME'])
|
? dirname($_SERVER['SCRIPT_NAME'])
|
||||||
: dirname(dirname($_SERVER['SCRIPT_NAME']));
|
: dirname(dirname($_SERVER['SCRIPT_NAME']));
|
||||||
define('BASE_URL', rtrim($dir, DIRECTORY_SEPARATOR));
|
define('BASE_URL', rtrim($dir, DIRECTORY_SEPARATOR));
|
||||||
|
Loading…
Reference in New Issue
Block a user