Skip to content

Commit 18eda7b

Browse files
committed
Bugfix nesting data reference
1 parent 6106bf6 commit 18eda7b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ public function insert($data = null, bool $returnID = true)
719719
}
720720

721721
// Trigger afterInsert events with the inserted data and new ID
722-
$this->trigger('afterInsert', ['id' => $this->insertID, 'data' => $data, 'result' => $result]);
722+
$this->trigger('afterInsert', ['id' => $this->insertID, 'data' => $data['data'], 'result' => $result]);
723723

724724
// If insertion failed, get out of here
725725
if (! $result)
@@ -841,7 +841,7 @@ public function update($id = null, $data = null): bool
841841
->set($data['data'], '', $escape)
842842
->update();
843843

844-
$this->trigger('afterUpdate', ['id' => $id, 'data' => $data, 'result' => $result]);
844+
$this->trigger('afterUpdate', ['id' => $id, 'data' => $data['data'], 'result' => $result]);
845845

846846
return $result;
847847
}

0 commit comments

Comments
 (0)