Make paths platform dependent.

This fixes issues with the built-in PHP webserver on windows.

Fixes #3608
This commit is contained in:
mark_story 2013-02-07 20:41:04 -05:00
parent 95bc8be4d5
commit fb8c2a5e46

View file

@ -305,7 +305,7 @@ class CakeRequest implements ArrayAccess {
$this->webroot = $base . '/';
$docRoot = env('DOCUMENT_ROOT');
$docRootContainsWebroot = strpos($docRoot, $dir . '/' . $webroot);
$docRootContainsWebroot = strpos($docRoot, $dir . DS . $webroot);
if (!empty($base) || !$docRootContainsWebroot) {
if (strpos($this->webroot, '/' . $dir . '/') === false) {