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

CollectionInputFilter throws warning if invalid collection provided #6494

Merged
merged 3 commits into from
Aug 7, 2014

Conversation

svycka
Copy link
Contributor

@svycka svycka commented Jul 29, 2014

invalid value for foreach that means not traversable or iteratable array

throws php Warning: Invalid argument supplied for foreach()

…ot traversable)

throws php Warning: `Invalid argument supplied for foreach()`
@@ -612,4 +612,18 @@ public function testNestedCollectionWithEmptyData()
$values = $inputFilter->getValues();
$this->assertEquals($data, $values);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace should be removed


public function testInvalidCollectionIsNotValid()
{
if (!extension_loaded('intl')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need intl for this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry copy paste fail

@ezimuel ezimuel added this to the 2.3.2 milestone Aug 6, 2014
@weierophinney weierophinney self-assigned this Aug 7, 2014
weierophinney added a commit that referenced this pull request Aug 7, 2014
CollectionInputFilter throws warning if invalid collection provided

Conflicts:
	tests/ZendTest/InputFilter/CollectionInputFilterTest.php
weierophinney added a commit that referenced this pull request Aug 7, 2014
- Scalar data cannot be validated, and should be considered false.
weierophinney added a commit that referenced this pull request Aug 7, 2014
@weierophinney weierophinney merged commit 85a3155 into zendframework:master Aug 7, 2014
weierophinney added a commit that referenced this pull request Aug 7, 2014
@weierophinney
Copy link
Member

Fixed! Thanks for the unit test -- made it very easy to find and implement a solution.

@svycka svycka deleted the patch-2 branch August 7, 2014 17:49
weierophinney added a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
CollectionInputFilter throws warning if invalid collection provided

Conflicts:
	tests/ZendTest/InputFilter/CollectionInputFilterTest.php
weierophinney added a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
- Scalar data cannot be validated, and should be considered false.
weierophinney added a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants