Skip to content

Loading…

DDC-1911: [GH-392] Replaced a shallow-copy with a deep-copy to avoid side effects. #2579

Closed
doctrinebot opened this Issue · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of egeloen:

Url: #392

Message:

Hey!

I'm currently using Symfony 2.1 Doctrine master branch Pager fanta master branch.

I'm facing a very vicious issue.

The doctrine paginator is able to clone a query with his cloneQuery method. This method will only clone the query without this parameters & hints. The issue is the parameters is setted with the setParameters method which will only affect the ArrayCollection reference to the new query builder and so, shared the reference between the two queries.

This PR will make a deep-copy of the ArrayCollection instead of a simple shallow-copy.

I'm not sure if this fix is the best solution.

Let me know if you need more information. :)

@doctrinebot

Comment created by @beberlei:

A related Github Pull-Request [GH-392] was closed
#392

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-392] was closed:
doctrine/dbal#392

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.3 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.