Skip to content

Commit 9694656

Browse files
committed
Fix crash when create empty record (no attributes set)
Now app crashes when no attribute set
1 parent fda3e2a commit 9694656

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/AuditingTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public function auditCreation()
156156

157157
if (((!isset($this->auditEnabled) || $this->auditEnabled)) && (!$LimitReached || $LogCleanup)) {
158158
$log = ['old_value' => null];
159+
$log['new_value'] = [];
159160

160161
foreach ($this->updatedData as $key => $value) {
161162
if ($this->isAuditing($key)) {

0 commit comments

Comments
 (0)