Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ytake committed Sep 19, 2017
1 parent 07ae7ad commit 971874c
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 971874c

Please sign in to comment.