mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
Update HandleErrors.php
@franzliedke forgot to make variables available to the method, just triggered this but got a warning that all three variables are undefined.
This commit is contained in:
parent
70fd50314d
commit
dfc9b5a286
|
@ -60,11 +60,11 @@ class HandleErrors
|
||||||
try {
|
try {
|
||||||
return $out($request, $response);
|
return $out($request, $response);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return $this->formatException($e);
|
return $this->formatException($e, $request, $response, $out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function formatException(Exception $error)
|
protected function formatException(Exception $error, Request $request, Response $response, callable $out = null)
|
||||||
{
|
{
|
||||||
$status = 500;
|
$status = 500;
|
||||||
$errorCode = $error->getCode();
|
$errorCode = $error->getCode();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user