Skip to content

Commit

Permalink
Merge pull request #3331 from michaelcullum/fetch-all
Browse files Browse the repository at this point in the history
Fetch all should use the driver statement's fetchAll method
  • Loading branch information
Ocramius authored Oct 25, 2018
2 parents 1b1adc2 + e35d5e1 commit bef35e9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,7 @@ public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEX
*/
public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
{
$rows = [];
while ($row = $this->fetch($fetchMode)) {
$rows[] = $row;
}

return $rows;
return $this->statement->fetchAll($fetchMode, $fetchArgument, $ctorArgs);
}

/**
Expand Down

0 comments on commit bef35e9

Please sign in to comment.