From 85f12597096e82b1f6d3163d55b12979d60b53fd Mon Sep 17 00:00:00 2001 From: Robert Nisipeanu Date: Thu, 25 May 2023 23:29:48 +0300 Subject: [PATCH] fix(4752): check if description field present on request --- app/Http/Controllers/Api/Client/Servers/SettingsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/Client/Servers/SettingsController.php b/app/Http/Controllers/Api/Client/Servers/SettingsController.php index e84c15910..b939f1680 100644 --- a/app/Http/Controllers/Api/Client/Servers/SettingsController.php +++ b/app/Http/Controllers/Api/Client/Servers/SettingsController.php @@ -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,