Skip to content

Commit 51bbd10

Browse files
authored
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
1 parent 62aab79 commit 51bbd10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Http/Controllers/Api/Client/Servers/StartupController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ public function update(UpdateStartupVariableRequest $request, Server $server): a
7777

7878
$startup = $this->startupCommandService->handle($server);
7979

80-
if ($variable->env_variable !== $request->input('value')) {
80+
if ($original !== $request->input('value')) {
8181
Activity::event('server:startup.edit')
8282
->subject($variable)
8383
->property([
8484
'variable' => $variable->env_variable,
8585
'old' => $original,
86-
'new' => $request->input('value'),
86+
'new' => $request->input('value') ?? '',
8787
])
8888
->log();
8989
}

0 commit comments

Comments
 (0)