1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 09:02:28 +01:00

fix(4752): check if description field present on request

This commit is contained in:
Robert Nisipeanu 2023-05-25 23:29:48 +03:00 committed by Matthew Penner
parent bf1768406b
commit 85f1259709

View File

@ -35,7 +35,7 @@ class SettingsController extends ClientApiController
public function rename(RenameServerRequest $request, Server $server): JsonResponse
{
$name = $request->input('name');
$description = $request->input('description') ?? $server->description;
$description = $request->has('description') ? (string) $request->input('description') : $server->description;
$this->repository->update($server->id, [
'name' => $name,
'description' => $description,