From ecd0ff35361615395b69ac4d809bc72eeb36b5e7 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 19 Jan 2017 14:18:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84Model=E7=9A=84=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=85=B3=E8=81=94=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/think/Model.php b/library/think/Model.php index 21fc10f0..3455b4a8 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -831,6 +831,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess if ($val instanceof Model) { $val->save(); } else { + unset($this->data[$name]); $model = $this->getAttr($name); if ($model instanceof Model) { $model->save($val);