Skip to content

Commit edef908

Browse files
committed
fix: defined / route may be ignored
1 parent e497c49 commit edef908

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

system/Router/Router.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,9 @@ public function __construct(RouteCollectionInterface $routes, ?Request $request
166166
*/
167167
public function handle(?string $uri = null)
168168
{
169-
// If we cannot find a URI to match against, then
170-
// everything runs off of its default settings.
169+
// If we cannot find a URI to match against, then set it to root (`/`).
171170
if ($uri === null || $uri === '') {
172-
return strpos($this->controller, '\\') === false
173-
? $this->collection->getDefaultNamespace() . $this->controller
174-
: $this->controller;
171+
$uri = '/';
175172
}
176173

177174
// Decode URL-encoded string

0 commit comments

Comments
 (0)