Skip to content

Commit 916285e

Browse files
author
ethan
committed
em
1 parent d726547 commit 916285e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/EntityManager.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,12 @@ public function findAllBySql($sql = '', $params = array())
9898
{
9999
$models = parent::findAllBySql($sql, $params);
100100

101-
if ($this->fetchClass === null) {
102-
return $models;
103-
} else {
104-
array_walk($models, function (&$model) {
101+
array_walk($models, function (&$model) {
102+
if (is_object($model)) {
105103
static::$modelStorage->attach($model, serialize((array)$model));
106-
});
107-
return $models;
108-
}
104+
}
105+
});
106+
return $models;
109107
}
110108

111109
private function getPkWhere(array $attributes)

0 commit comments

Comments
 (0)