From 8c24e528adffaf0987be270b2931b526dd08d577 Mon Sep 17 00:00:00 2001 From: Eric GELOEN Date: Sat, 7 Jul 2012 11:33:58 +0200 Subject: [PATCH] Clone directly the ArrayCollection instead of looping --- lib/Doctrine/ORM/Tools/Pagination/Paginator.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Pagination/Paginator.php b/lib/Doctrine/ORM/Tools/Pagination/Paginator.php index 202602015..bb1514ea0 100644 --- a/lib/Doctrine/ORM/Tools/Pagination/Paginator.php +++ b/lib/Doctrine/ORM/Tools/Pagination/Paginator.php @@ -209,9 +209,7 @@ class Paginator implements \Countable, \IteratorAggregate /* @var $cloneQuery Query */ $cloneQuery = clone $query; - foreach ($query->getParameters() as $parameter) { - $cloneQuery->setParameter($parameter->getName(), $parameter->getValue(), $parameter->getType()); - } + $cloneQuery->setParameters(clone $query->getParameters()); foreach ($query->getHints() as $name => $value) { $cloneQuery->setHint($name, $value);