Permalink
Browse files

MINOR Added brackets around strpos() check just to be sure it works (…

…from r98898)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102814 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent c229d64 commit 0759568db54974d7cbaaa67c408b1eef3afdae23 @chillu chillu committed Apr 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/Core.php
View
2 core/Core.php
@@ -134,7 +134,7 @@ function array_fill_keys($keys,$value) {
// If that didn't work, failover to the old syntax. Hopefully this isn't necessary, and maybe
// if can be phased out?
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(dirname($_SERVER['SCRIPT_NAME']));
define('BASE_URL', rtrim($dir, DIRECTORY_SEPARATOR));

0 comments on commit 0759568

Please sign in to comment.