diff --git a/src/Boot/DrupalBoot.php b/src/Boot/DrupalBoot.php index 10403a16f2..974c1d8850 100644 --- a/src/Boot/DrupalBoot.php +++ b/src/Boot/DrupalBoot.php @@ -34,11 +34,13 @@ protected function scanUpForUri($root, $scan) if (file_exists("$scan/settings.php")) { return $scan; } - $next = dirname($scan); + // Use Path::getDirectory instead of dirname to + // avoid certain bugs. Returns a canonicalized path. + $next = Path::getDirectory($scan); if ($next == $scan) { return false; } - $scan = Path::canonicalize($next); + $scan = $next; if ($scan == $root) { return false; }