Skip to content

Commit 88c5bb4

Browse files
Arnaud LierDaneEveritt
authored andcommitted
Added a return in DatabaseController when a error occurs (pterodactyl#1742)
* Added a return in DatabaseController when a error occurs * add return on database update too
1 parent 1922db6 commit 88c5bb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Http/Controllers/Admin/DatabaseController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function create(DatabaseHostFormRequest $request): RedirectResponse
131131
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
132132
)->flash();
133133

134-
redirect()->route('admin.databases')->withInput($request->validated());
134+
return redirect()->route('admin.databases')->withInput($request->validated());
135135
} else {
136136
throw $exception;
137137
}
@@ -165,7 +165,7 @@ public function update(DatabaseHostFormRequest $request, DatabaseHost $host): Re
165165
$this->alert->danger(
166166
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
167167
)->flash();
168-
$redirect->withInput($request->normalize());
168+
return $redirect->withInput($request->normalize());
169169
} else {
170170
throw $exception;
171171
}

0 commit comments

Comments
 (0)