1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Replaced a shallow-copy with a deep-copy to avoid side effects.

This commit is contained in:
Eric GELOEN 2012-07-06 17:49:03 +02:00
parent 0a95e42ea8
commit 996e47bf61

View File

@ -208,7 +208,11 @@ class Paginator implements \Countable, \IteratorAggregate
{
/* @var $cloneQuery Query */
$cloneQuery = clone $query;
$cloneQuery->setParameters($query->getParameters());
foreach ($query->getParameters() as $parameter) {
$cloneQuery->setParameter($parameter->getName(), $parameter->getValue(), $parameter->getType());
}
foreach ($query->getHints() as $name => $value) {
$cloneQuery->setHint($name, $value);
}