From 51bbd10a015ae29ee6872eaf6cbfd647aabbae4c Mon Sep 17 00:00:00 2001 From: Daniel Barton Date: Fri, 27 Mar 2026 07:24:02 +0800 Subject: [PATCH] Fix: Compare to correct variable in startup variable activity log (#5605) - Fixes issue where the panel would create activity logs even when the value didn't change - Log an empty string instead of displaying "null" when the variable is empty Closes #5604 --- app/Http/Controllers/Api/Client/Servers/StartupController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/Client/Servers/StartupController.php b/app/Http/Controllers/Api/Client/Servers/StartupController.php index 0bf3e74df..2f8cd6c6a 100644 --- a/app/Http/Controllers/Api/Client/Servers/StartupController.php +++ b/app/Http/Controllers/Api/Client/Servers/StartupController.php @@ -77,13 +77,13 @@ class StartupController extends ClientApiController $startup = $this->startupCommandService->handle($server); - if ($variable->env_variable !== $request->input('value')) { + if ($original !== $request->input('value')) { Activity::event('server:startup.edit') ->subject($variable) ->property([ 'variable' => $variable->env_variable, 'old' => $original, - 'new' => $request->input('value'), + 'new' => $request->input('value') ?? '', ]) ->log(); }