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

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