From 8d9e3756c71fc028d2379c8597c333c17f7e07a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 5 Mar 2021 18:08:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/ActiveRecord.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index 1660a9cf..75329143 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -269,10 +269,7 @@ class ActiveRecord extends BaseActiveRecord { $data = $this->_attributes; foreach ($this->getAnnotation(self::ANNOTATION_GET) as $key => $item) { - if (!isset($data[$key])) { - continue; - } - $data[$key] = $this->runAnnotation($key, $data[$key]); + $data[$key] = $this->runAnnotation($key, $data[$key] ?? null); } $data = array_merge($data, $this->runRelate()); $this->recover();