diff --git a/src/Middleware/RouteDispatcher.php b/src/Middleware/RouteDispatcher.php index 1f18c428..99568385 100644 --- a/src/Middleware/RouteDispatcher.php +++ b/src/Middleware/RouteDispatcher.php @@ -34,7 +34,7 @@ class RouteDispatcher implements MiddlewareInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { - $path = (new Uri($request->getUri()))->getPath(); + $path = (new Uri((string) $request->getUri()))->getPath(); if ($request instanceof Request) { $path = $request->getPathInfo(); }