mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-29 10:55:43 -05:00
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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user