From 88c5bb4f97b94e6f5689825b3f2428798d6f9a3d Mon Sep 17 00:00:00 2001 From: Arnaud Lier Date: Mon, 11 Nov 2019 18:01:38 +0100 Subject: [PATCH] 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 --- app/Http/Controllers/Admin/DatabaseController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/DatabaseController.php b/app/Http/Controllers/Admin/DatabaseController.php index 777b27792..4fecbbccf 100644 --- a/app/Http/Controllers/Admin/DatabaseController.php +++ b/app/Http/Controllers/Admin/DatabaseController.php @@ -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; }