Skip to content

Commit 4cc16a1

Browse files
committed
Bug fixed regarding to double slash char.
1 parent 89fda9d commit 4cc16a1

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ private function addRoute($uri, $method, $callback, $settings)
428428
}
429429

430430
$data = [
431-
'route' => $route,
431+
'route' => str_replace('//', '/', $route),
432432
'method' => strtoupper($method),
433433
'callback' => (is_object($callback) ? $callback : $this->namespaces['controllers'] . $callback),
434434
'alias' => (isset($settings['alias']) ? $settings['alias'] : (isset($settings['as']) ? $settings['as'] : null)),

src/Router/RouterCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public function beforeAfter($command, $middleware, $path = '', $namespace = '')
9898
public function runRoute($command, $params = null, $path = '', $namespace = '')
9999
{
100100
if(!is_object($command)) {
101-
102101
$segments = explode('@', $command);
103102
$controllerClass = str_replace([$namespace, '\\', '.'], ['', '/', '/'], $segments[0]);
104103
$controllerMethod = $segments[1];

0 commit comments

Comments
 (0)