This commit is contained in:
2021-03-05 18:34:31 +08:00
parent 623c08aeab
commit be51917c38
+2 -5
View File
@@ -68,14 +68,11 @@ class CollectionIterator extends \ArrayIterator
/** /**
* @return mixed
* @throws Exception * @throws Exception
*/ */
public function current(): mixed public function current(): ActiveRecord
{ {
$current = parent::current(); if (!(($current = parent::current()) instanceof ActiveRecord)) {
var_dump($current);
if (!($current instanceof ActiveRecord)) {
$current = $this->newModel($current); $current = $this->newModel($current);
} }
return $this->query->getWith($current); return $this->query->getWith($current);