From 7dbd1514dd17478703c5629190f10b23f442a85a Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Wed, 10 Mar 2021 14:36:03 +0100 Subject: [PATCH] fix(UuidModel): update condition to check if insertion succeeded New changes were introduced to the BaseModel when fixing a bug in codeigniter4: https://github.com/codeigniter4/CodeIgniter4/pull/4176 fixes #2 --- src/UuidModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UuidModel.php b/src/UuidModel.php index 6a2175e..154c39d 100644 --- a/src/UuidModel.php +++ b/src/UuidModel.php @@ -547,7 +547,7 @@ public function insert($data = null, bool $returnID = true) ->insert(); // If insertion succeeded then save the insert ID - if ($result->resultID) + if ($result) { if (! $this->useAutoIncrement) {