From e35d5e12eadf567d61e0e8295991d0d8b71deba9 Mon Sep 17 00:00:00 2001 From: MichaelC Date: Thu, 25 Oct 2018 16:40:08 +0100 Subject: [PATCH] Fetch all should use the driver statement's fetchAll method --- lib/Doctrine/DBAL/Cache/ResultCacheStatement.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php index 1636391e697..872f3e71fc9 100644 --- a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php +++ b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php @@ -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); } /**