diff --git a/src/Concerns/HasSetting.php b/src/Concerns/HasSetting.php index 0eca8ce..f4f6dbf 100644 --- a/src/Concerns/HasSetting.php +++ b/src/Concerns/HasSetting.php @@ -169,7 +169,7 @@ private function modifiedState(): array $changes = []; foreach ($newValues as $key => $newValue) { - $oldValues[$key] = $oldValues[$key] ?? '—'; + $oldValue = is_array($oldValues[$key]) ? json_encode($oldValues[$key]) : $oldValues[$key] ?? '-'; $newValue = $newValue ?? '—'; if (is_array($newValue)) { @@ -177,7 +177,7 @@ private function modifiedState(): array } if (isset($oldValues[$key]) && $oldValues[$key] != $newValue) { - $changes[] = "- {$key} from ".htmlspecialchars($oldValues[$key]).' to '.htmlspecialchars($newValue).''; + $changes[] = "- {$key} from ".htmlspecialchars($oldValue).' to '.htmlspecialchars($newValue).''; } }