From ac67994b7217fa82102f52ae22fce910eadff464 Mon Sep 17 00:00:00 2001 From: Dmitriy Novash Date: Thu, 9 Jun 2022 19:18:34 +0300 Subject: [PATCH] getScriptRoot return wrong path when use symlinks --- src/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.php b/src/main.php index 2017cba..53e2cfd 100644 --- a/src/main.php +++ b/src/main.php @@ -1160,7 +1160,7 @@ f00bar; } private function chDirIfNecessary($d) { - if (substr(getcwd(), strlen($this->getScriptRoot())) != $this->getValidDir($d) && !empty($d)) + if (substr(getcwd(), strlen($this->getRootDir())) != $this->getValidDir($d) && !empty($d)) chdir($d); }