mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[BUGFIX] Fixed exception-handler rewrite not always triggered
This commit is contained in:
@@ -346,7 +346,7 @@ class Router
|
||||
/* Verify csrf token for request */
|
||||
$this->csrfVerifier->handle($this->request);
|
||||
} catch(Exception $e) {
|
||||
$this->handleException($e);
|
||||
return $this->handleException($e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,12 +444,12 @@ class Router
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
$this->handleException($e);
|
||||
return $this->handleException($e);
|
||||
}
|
||||
|
||||
if ($methodNotAllowed === true) {
|
||||
$message = sprintf('Route "%s" or method "%s" not allowed.', $this->request->getUrl()->getPath(), $this->request->getMethod());
|
||||
$this->handleException(new NotFoundHttpException($message, 403));
|
||||
return $this->handleException(new NotFoundHttpException($message, 403));
|
||||
}
|
||||
|
||||
if (count($this->request->getLoadedRoutes()) === 0) {
|
||||
|
||||
Reference in New Issue
Block a user