Skip to content

Commit

Permalink
Fix TokenMismatchException not being handled if app.debug is false (
Browse files Browse the repository at this point in the history
#358)

Signed-off-by: Micheal Mand <micheal@kmdwebdesigns.com>
  • Loading branch information
mikemand authored and nWidart committed Jul 27, 2017
1 parent 8cf4ec9 commit e91395a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e91395a

Please sign in to comment.