This commit is contained in:
2021-01-19 19:16:59 +08:00
parent d639504842
commit 1546007948
+4 -1
View File
@@ -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());