Replaced a shallow-copy with a deep-copy to avoid side effects.
This commit is contained in:
parent
0a95e42ea8
commit
996e47bf61
1 changed files with 5 additions and 1 deletions
|
@ -208,7 +208,11 @@ class Paginator implements \Countable, \IteratorAggregate
|
||||||
{
|
{
|
||||||
/* @var $cloneQuery Query */
|
/* @var $cloneQuery Query */
|
||||||
$cloneQuery = clone $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) {
|
foreach ($query->getHints() as $name => $value) {
|
||||||
$cloneQuery->setHint($name, $value);
|
$cloneQuery->setHint($name, $value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue