Fixed error 500 on HTTP error pages.
This commit is contained in:
parent
0a86525c9d
commit
57c4677d52
1 changed files with 3 additions and 3 deletions
|
@ -22,9 +22,9 @@ class RoutingContext {
|
|||
}
|
||||
|
||||
public function registerDefaultErrorPages(): void {
|
||||
$this->router->addErrorHandler(401, fn($resp) => $resp->setContent($this->templating->rendering('errors/401')));
|
||||
$this->router->addErrorHandler(403, fn($resp) => $resp->setContent($this->templating->rendering('errors/403')));
|
||||
$this->router->addErrorHandler(404, fn($resp) => $resp->setContent($this->templating->rendering('errors/404')));
|
||||
$this->router->addErrorHandler(401, fn($resp) => $resp->setContent($this->templating->render('errors/401')));
|
||||
$this->router->addErrorHandler(403, fn($resp) => $resp->setContent($this->templating->render('errors/403')));
|
||||
$this->router->addErrorHandler(404, fn($resp) => $resp->setContent($this->templating->render('errors/404')));
|
||||
$this->router->addErrorHandler(500, fn($resp) => $resp->setContent(file_get_contents(HAU_DIR_TEMPLATES . '/errors/500.html')));
|
||||
$this->router->addErrorHandler(503, fn($resp) => $resp->setContent(file_get_contents(HAU_DIR_TEMPLATES . '/errors/503.html')));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue