1
0
mirror of https://github.com/flarum/core.git synced 2025-08-09 09:57:06 +02:00

#719 Fixed PermissionDeniedException

...causing Whoops on debug and 500 HTTP error
instead of 403 Forbidden error page.
This commit is contained in:
Albert221
2016-01-07 17:55:08 +01:00
parent 417b7f7972
commit e8a6fe2f7b
3 changed files with 18 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ class HandleErrors implements ErrorMiddlewareInterface
$status = $errorCode;
}
if ($this->debug && $errorCode !== 404) {
if ($this->debug && ! in_array($errorCode, [403, 404])) {
$whoops = new WhoopsMiddleware;
return $whoops($error, $request, $response, $out);