Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Clear values on CollectionInputFilter before adding new data #6472

Closed
wants to merge 2 commits into from

Conversation

atodd
Copy link
Contributor

@atodd atodd commented Jul 17, 2014

This is related to issue #6304. Instead of calling the clear methods only when there is no value, calling clear on every iteration will prevent data collisions from happening.

@adamlundrigan
Copy link
Contributor

The Travis-CI failures are not related to the code supplied (code coverage generation error).

This code will need tests before it can be merged.

At first glance I'm not certain if this completely fixes the original issue...I will test it out on the codebase where I originally encountered the issue to check. The crux of the issue there is that the structure of the input filter and all it's children is carried over, not the values. I'm away for the weekend but will whip up a test case that illustrates the issue more clearly early next week.

@atodd
Copy link
Contributor Author

atodd commented Jul 17, 2014

Added a unit test to verify that data from a collection will not be added to a sibling collection in a nested set.

@atodd
Copy link
Contributor Author

atodd commented Jul 30, 2014

@adamlundrigan have you had a chance to review these changes any further?

@ezimuel ezimuel added this to the 2.3.2 milestone Aug 6, 2014
@Ocramius Ocramius self-assigned this Aug 6, 2014
Ocramius added a commit that referenced this pull request Aug 6, 2014
Ocramius added a commit that referenced this pull request Aug 6, 2014
Ocramius added a commit that referenced this pull request Aug 6, 2014
@Ocramius Ocramius closed this in 8a8a807 Aug 6, 2014
@Ocramius
Copy link
Member

Ocramius commented Aug 6, 2014

@atodd merged, thanks!

gianarb pushed a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants