From a5ee5689f9cf5b78fb70b4614c88513d9f451f78 Mon Sep 17 00:00:00 2001 From: Micheal Mand Date: Thu, 27 Jul 2017 10:14:09 -0600 Subject: [PATCH] Fix TokenMismatchException not being handled if `app.debug` is `false` Signed-off-by: Micheal Mand --- app/Exceptions/Handler.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index b38f48592..06b0aee38 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -54,14 +54,14 @@ public function render($request, Exception $e) return parent::render($request, $e); } - if (config('app.debug') === false) { - return $this->handleExceptions($e); - } - if ($e instanceof TokenMismatchException) { return redirect()->back() - ->withInput($request->except('password')) - ->withErrors(trans('core::core.error token mismatch')); + ->withInput($request->except('password')) + ->withErrors(trans('core::core.error token mismatch')); + } + + if (config('app.debug') === false) { + return $this->handleExceptions($e); } return parent::render($request, $e);