From ffadbdab8337f8a88608a97151948a188f705e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 18 Jan 2022 17:56:47 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model.php b/Model.php index 67f3c12..bb4c1f2 100644 --- a/Model.php +++ b/Model.php @@ -121,7 +121,7 @@ class Model extends Base\Model /** @var static $select */ $select = static::query()->where($condition)->first(); if (empty($select)) { - $select = duplicate(static::class); + $select = new static(); $select->attributes = $attributes; $select->setIsNowExample(true); if (!$select->save()) {