Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
empty requestedPath issue resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorkmaz committed Jul 23, 2018
1 parent 5d3e6a9 commit 9ad157c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/RouterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$config = $container->get('config');
$this->routes = $container->get('routes');
$request = $container->get(ServerRequestInterface::class);
$requestedPath = $request->getUri()->getPath() !== '' ? $request->getUri()->getPath() : '/';
$this->router = new Router(
$config['app']['default_return_type'] ?? Router::HTML,
$request->getMethod(),
$request->getUri()->getPath(),
$requestedPath,
$config['app']['folder'] ?? '',
$config['app']['cache_file'] ?? null
);
Expand Down

0 comments on commit 9ad157c

Please sign in to comment.