Skip to content

Commit 78b76a8

Browse files
committed
fix: bug lorsqu4on met le parametre $returnId a false dans la methode Model::create
1 parent 56342ef commit 78b76a8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Model.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,10 @@ public function create(null|array|object $data = null, bool $returnID = true)
461461
$this->escape = $this->tempData['escape'] ?? [];
462462
$this->tempData = [];
463463

464-
$builder = $this->builder();
464+
$builder = $this->builder();
465+
$inserted = $builder->insert($data);
465466

466-
if ($returnID && true === $inserted = $builder->insert($data)) {
467+
if ($returnID && true === $inserted) {
467468
return $this->db->lastId($builder->getTable());
468469
}
469470

0 commit comments

Comments
 (0)