mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Make paths platform dependent.
This fixes issues with the built-in PHP webserver on windows. Fixes #3608
This commit is contained in:
parent
95bc8be4d5
commit
fb8c2a5e46
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue