Skip to content

Commit d19e5e8

Browse files
committed
Bug fixed.
1 parent 265b8b2 commit d19e5e8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Router.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,14 @@ public function controller($route, $settings, $controller = null)
468468
}
469469

470470
$controller = str_replace(['\\', '.'], '/', $controller);
471-
$controller = trim(preg_replace('/'.$this->paths['controllers'].'/i', '', $controller, 1), '/');
471+
$controller = trim(
472+
preg_replace(
473+
'/'.str_replace('/', '\\/', $this->paths['controllers']).'/i',
474+
'', $controller,
475+
1
476+
),
477+
'/'
478+
);
472479
$controllerFile = realpath(
473480
rtrim($this->paths['controllers'], '/') . '/' . $controller . '.php'
474481
);

0 commit comments

Comments
 (0)