Skip to content

Commit 9357577

Browse files
authored
fix null values for old_values and new_values (#959)
1 parent 28ecd2d commit 9357577

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Audit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ public function resolveData(): array
102102
$this->metadata = array_keys($this->data);
103103

104104
// Modified Auditable attributes
105-
foreach ($this->new_values as $key => $value) {
105+
foreach ($this->new_values ?? [] as $key => $value) {
106106
$this->data['new_' . $key] = $value;
107107
}
108108

109-
foreach ($this->old_values as $key => $value) {
109+
foreach ($this->old_values ?? [] as $key => $value) {
110110
$this->data['old_' . $key] = $value;
111111
}
112112

0 commit comments

Comments
 (0)