Skip to content

Commit ff8b5fc

Browse files
committed
Fix exception when modifying existing DB host, closes pterodactyl#910
1 parent de1d950 commit ff8b5fc

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1010
* `[rc.1]` — Fixes exception thown when attempting to adjust mail settings as well as a validation error thrown afterwards.
1111
* `[rc.1]` — Fixes bug preventing modification of the default value for an Egg variable.
1212
* `[rc.1]` — Fixed a bug that would occur when attempting to reset the daemon secret for a node.
13+
* `[rc.1]` — Fix exception thrown when attempting to modify an existing database host.
1314

1415
## v0.7.0-rc.1 (Derelict Dermodactylus)
1516
### Fixed

app/Http/Controllers/Admin/DatabaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function index(): View
100100
*
101101
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
102102
*/
103-
public function view($host): View
103+
public function view(int $host): View
104104
{
105105
return view('admin.databases.view', [
106106
'locations' => $this->locationRepository->getAllWithNodes(),

app/Http/Requests/Admin/DatabaseHostFormRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function rules()
2323
}
2424

2525
if ($this->method() !== 'POST') {
26-
return DatabaseHost::getUpdateRulesForId($this->route()->parameter('host')->id);
26+
return DatabaseHost::getUpdateRulesForId($this->route()->parameter('host'));
2727
}
2828

2929
return DatabaseHost::getCreateRules();

0 commit comments

Comments
 (0)