diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 59b2ee2a9..e5574c0e0 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -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) {