1
0
mirror of https://github.com/flarum/core.git synced 2025-08-20 15:21:49 +02:00
This commit is contained in:
Toby Zerner
2016-01-16 13:57:17 +10:30
3 changed files with 18 additions and 1 deletions

View File

@@ -14,4 +14,8 @@ use Exception;
class PermissionDeniedException extends Exception
{
public function __construct($message = null, $code = 403, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}

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);