From 45869321ac227c33eee29020bd9b3b7061403a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 5 Jul 2020 15:15:29 +0200 Subject: [PATCH] MAPG-193 fix PersistentDataManager::selectMultipleFromDb --- src/PersistentData/PersistentDataManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PersistentData/PersistentDataManager.php b/src/PersistentData/PersistentDataManager.php index 3f2c817..38c58db 100644 --- a/src/PersistentData/PersistentDataManager.php +++ b/src/PersistentData/PersistentDataManager.php @@ -27,8 +27,9 @@ class PersistentDataManager public function selectMultipleFromDb(Select $select, string $type, bool $withRelations = false): Generator { $select = $this->createSelect($select, $type, $withRelations); + $result = $select->execute(); - while ($data = $select->execute()->fetch(IResultSet::FETCH_ASSOC)) { + while ($data = $result->fetch(IResultSet::FETCH_ASSOC)) { $model = new $type(); $this->fillWithData($data, $model);