From 154600794853747516a2ad24ed25b9d28fe2b367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 19 Jan 2021 19:16:59 +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, 4 insertions(+), 1 deletion(-) diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index d8594ceb..07e5436f 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -317,7 +317,10 @@ class ActiveRecord extends BaseActiveRecord $data = $this->_attributes; foreach ($callback as $key => $item) { - $data[$key] = call_user_func($item, $data[$key]); + $result = call_user_func($item['handler'], $data[$key]); + foreach ($item['attributes'] as $attribute) { + $data[$attribute] = $result; + } } return array_merge($data, $this->runRelate());