Replaced a shallow-copy with a deep-copy to avoid side effects.
This commit is contained in:
parent
0a95e42ea8
commit
996e47bf61
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user