This commit is contained in:
2020-09-08 10:26:34 +08:00
parent e7e13e9f8b
commit 10133953c3
+6 -1
View File
@@ -110,8 +110,13 @@ abstract class AbstractCollection extends Component implements \IteratorAggregat
if (!$this->offsetExists($offset)) {
return NULL;
}
if ($this->_item[$offset] instanceof ActiveRecord) {
return $this->_item[$offset];
}
/** @var ActiveRecord $model */
return $this->_item[$offset];
return $this->model::populate($this->_item[$offset]);
}
/**