From 8dce475aac47fea67694bb5739e20746f99a0ac0 Mon Sep 17 00:00:00 2001 From: Isma Date: Mon, 12 Feb 2018 22:21:56 +0000 Subject: [PATCH] Add an empty error bag for HTTP exceptions --- src/Illuminate/Foundation/Exceptions/Handler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index f381382583c5..59f51cb4fc43 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -11,6 +11,7 @@ use Illuminate\Routing\Router; use Illuminate\Http\JsonResponse; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\ViewErrorBag; use Illuminate\Filesystem\Filesystem; use Illuminate\Http\RedirectResponse; use Whoops\Handler\PrettyPageHandler; @@ -400,7 +401,7 @@ protected function renderHttpException(HttpException $e) })->push(__DIR__.'/views')->all()); if (view()->exists($view = "errors::{$status}")) { - return response()->view($view, ['exception' => $e], $status, $e->getHeaders()); + return response()->view($view, ['exception' => $e, 'errors' => new ViewErrorBag], $status, $e->getHeaders()); } return $this->convertExceptionToResponse($e);