From be51917c388a1064a0c958bb31b4647887c4c31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 5 Mar 2021 18:34:31 +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/Base/CollectionIterator.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Database/Base/CollectionIterator.php b/Database/Base/CollectionIterator.php index 84194e41..fb3cfd43 100644 --- a/Database/Base/CollectionIterator.php +++ b/Database/Base/CollectionIterator.php @@ -68,14 +68,11 @@ class CollectionIterator extends \ArrayIterator /** - * @return mixed * @throws Exception */ - public function current(): mixed + public function current(): ActiveRecord { - $current = parent::current(); - var_dump($current); - if (!($current instanceof ActiveRecord)) { + if (!(($current = parent::current()) instanceof ActiveRecord)) { $current = $this->newModel($current); } return $this->query->getWith($current);