fix backslash bug

This commit is contained in:
Dennis Eichhorn 2018-10-27 20:41:39 +02:00
parent 6e6ce55bb8
commit 65e35ec38e

View File

@ -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);
}