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

Commit c65177a

Browse files
committed
Merge pull request #72 branch 'hotfix/72'
2 parents 8bb39ef + 3ffd32c commit c65177a

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ All notable changes to this project will be documented in this file, in reverse
3636

3737
### Fixed
3838

39-
- Nothing.
39+
- [#72](https://github.com/zendframework/zend-inputfilter/pull/72) `ArrayInput`
40+
value is properly reset after `BaseInputFilter::setData()`
4041

4142
## 2.5.5 - 2015-09-03
4243

src/BaseInputFilter.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,6 @@ protected function populate()
512512
continue;
513513
}
514514

515-
if ($input instanceof ArrayInput) {
516-
$input->setValue([]);
517-
continue;
518-
}
519-
520515
if ($input instanceof Input) {
521516
$input->resetValue();
522517
continue;

test/BaseInputFilterTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use PHPUnit_Framework_MockObject_MockObject as MockObject;
1616
use PHPUnit_Framework_TestCase as TestCase;
1717
use stdClass;
18-
use Zend\InputFilter\ArrayInput;
1918
use Zend\InputFilter\BaseInputFilter;
2019
use Zend\InputFilter\Exception\InvalidArgumentException;
2120
use Zend\InputFilter\Exception\RuntimeException;
@@ -556,23 +555,6 @@ public function testAddingExistingInputWillMergeIntoExisting()
556555
$this->assertFalse($filter->get('foo')->isRequired());
557556
}
558557

559-
/**
560-
* @group 5638
561-
*/
562-
public function testPopulateSupportsArrayInputEvenIfDataMissing()
563-
{
564-
/** @var ArrayInput|MockObject $arrayInput */
565-
$arrayInput = $this->getMock(ArrayInput::class);
566-
$arrayInput
567-
->expects($this->once())
568-
->method('setValue')
569-
->with([]);
570-
571-
$filter = $this->inputFilter;
572-
$filter->add($arrayInput, 'arrayInput');
573-
$filter->setData(['foo' => 'bar']);
574-
}
575-
576558
/**
577559
* @group 6431
578560
*/

0 commit comments

Comments
 (0)