mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 21:22:17 +00:00
Added more info on route or method not allowed exception
This commit is contained in:
committed by
GitHub
parent
4a353efc97
commit
c45cd6347a
@@ -285,7 +285,8 @@ class Router
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($routeNotAllowed === true) {
|
if ($routeNotAllowed === true) {
|
||||||
$this->handleException(new HttpException('Route or method not allowed', 403));
|
$message = sprintf('Route "%s" or method "%s" not allowed.', $this->request->getUri()->getPath(), $this->request->getMethod());
|
||||||
|
$this->handleException(new HttpException($message, 403));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->request->getLoadedRoute() === null) {
|
if ($this->request->getLoadedRoute() === null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user