Skip to content

Commit

Permalink
Check blank uri
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansuter committed Sep 5, 2019
1 parent 3725590 commit 80d741c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Slim/Routing/RouteResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(RouteCollectorInterface $routeCollector, ?Dispatcher
public function computeRoutingResults(string $uri, string $method): RoutingResults
{
$uri = rawurldecode($uri);
if ($uri[0] !== '/') {
if ($uri === '' || $uri[0] !== '/') {
$uri = '/' . $uri;
}
return $this->dispatcher->dispatch($method, $uri);
Expand Down

0 comments on commit 80d741c

Please sign in to comment.