diff --git a/4-http.md b/4-http.md index 8229b76..0b148aa 100644 --- a/4-http.md +++ b/4-http.md @@ -18,7 +18,7 @@ Again, edit the `composer.json` to add the new component and then run `composer "require": { "php": ">=5.5.0", "filp/whoops": ">=1.1.2", - "patricklouys/http": ">=1.0.2" + "patricklouys/http": ">=1.0.3" }, ``` diff --git a/5-router.md b/5-router.md index b559a51..764d318 100644 --- a/5-router.md +++ b/5-router.md @@ -24,7 +24,7 @@ $dispatcher = \FastRoute\simpleDispatcher(function (\FastRoute\RouteCollector $r }); }); -$routeInfo = $dispatcher->dispatch($request->getMethod(), $request->getUri()); +$routeInfo = $dispatcher->dispatch($request->getMethod(), $request->getPath()); switch ($routeInfo[0]) { case \FastRoute\Dispatcher::NOT_FOUND: $response->setContent('404 - Page not found');