mirror of
https://github.com/flarum/core.git
synced 2025-08-02 06:30:53 +02:00
Add a "return home" link to 404 errors
This commit is contained in:
@@ -85,7 +85,11 @@ class HandleErrors
|
||||
// Log the exception (with trace)
|
||||
$this->logger->debug($error);
|
||||
|
||||
$view = $this->view->make('flarum::error')->with('error', $error);
|
||||
if (! $this->view->exists($name = 'flarum::error.'.$status)) {
|
||||
$name = 'flarum::error.default';
|
||||
}
|
||||
|
||||
$view = $this->view->make($name)->with('error', $error);
|
||||
|
||||
return new HtmlResponse($view->render(), $status);
|
||||
}
|
||||
|
Reference in New Issue
Block a user