Skip to content

Commit

Permalink
Merge pull request #5 from ytake/hotfix/resolve-instance
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
ytake authored Sep 19, 2017
2 parents 07ae7ad + 971874c commit 014ef26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/QueryResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ public function yieldObject(string $fetchClassName)
}
$column = $this->getColumns();
$columnCount = count($column);
$reflectionClass = new \ReflectionClass($fetchClassName);
$newInstance = $reflectionClass->newInstanceWithoutConstructor();
foreach ($this->data as $data) {
$reflectionClass = new \ReflectionClass($fetchClassName);
$newInstance = $reflectionClass->newInstanceWithoutConstructor();
for ($i = 0; $i < $columnCount; $i++) {
if ($reflectionClass->hasProperty($column[$i]->getName())) {
$property = $reflectionClass->getProperty($column[$i]->getName());
Expand Down

0 comments on commit 014ef26

Please sign in to comment.