From 65e35ec38efb477869e7cb80f2ebff7f26e41b7a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 27 Oct 2018 20:41:39 +0200 Subject: [PATCH] fix backslash bug --- Dispatcher/Dispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }