diff --git a/system/Model.php b/system/Model.php index 76d103347f47..239d980834a8 100644 --- a/system/Model.php +++ b/system/Model.php @@ -876,7 +876,7 @@ public function insert($data = null, bool $returnID = true) ->insert(); // If insertion succeeded then save the insert ID - if ($result->resultID) + if ($returnID && $result->resultID) { if (! $this->useAutoIncrement) {