X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/1c43602f4bed60a84f47735ca8bc4a399018e013..refs/pull/3039/head:/app/Exceptions/Handler.php diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 2d40f4476..3b4ad4a4d 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -9,6 +9,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Validation\ValidationException; use Symfony\Component\HttpKernel\Exception\HttpException; +use Throwable; class Handler extends ExceptionHandler { @@ -27,6 +28,7 @@ class Handler extends ExceptionHandler * @var array */ protected $dontFlash = [ + 'current_password', 'password', 'password_confirmation', ]; @@ -34,13 +36,13 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param Exception $exception + * @param \Throwable $exception * - * @throws Exception + * @throws \Throwable * * @return void */ - public function report(Exception $exception) + public function report(Throwable $exception) { parent::report($exception); } @@ -53,7 +55,7 @@ class Handler extends ExceptionHandler * * @return \Illuminate\Http\Response */ - public function render($request, Exception $e) + public function render($request, Throwable $e) { if ($this->isApiRequest($request)) { return $this->renderApiException($e);