diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php index 128411f18..a7a0f97c2 100644 --- a/Dispatcher/Dispatcher.php +++ b/Dispatcher/Dispatcher.php @@ -105,7 +105,7 @@ final class Dispatcher $views = []; $dispatch = \explode(':', $controller); - if (!\file_exists($path = __DIR__ . '/../../' . \str_replace('\\', '/', $dispatch[0]) . '.php')) { + if (!\file_exists($path = __DIR__ . '/../../' . \ltrim(\str_replace('\\', '/', $dispatch[0]), '/') . '.php')) { throw new PathException($path); }