Added a return in DatabaseController when a error occurs (#1742)

* Added a return in DatabaseController when a error occurs

* add return on database update too
This commit is contained in:
Arnaud Lier 2019-11-11 18:01:38 +01:00 committed by Dane Everitt
parent 1922db60db
commit 88c5bb4f97
1 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class DatabaseController extends Controller
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage()) sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
)->flash(); )->flash();
redirect()->route('admin.databases')->withInput($request->validated()); return redirect()->route('admin.databases')->withInput($request->validated());
} else { } else {
throw $exception; throw $exception;
} }
@ -165,7 +165,7 @@ class DatabaseController extends Controller
$this->alert->danger( $this->alert->danger(
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage()) sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
)->flash(); )->flash();
$redirect->withInput($request->normalize()); return $redirect->withInput($request->normalize());
} else { } else {
throw $exception; throw $exception;
} }