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

Commit a46714e

Browse files
committed
Merge pull request #72 branch 'hotfix/72'
2 parents a05fa0b + 3ffd32c commit a46714e

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ All notable changes to this project will be documented in this file, in reverse
1818

1919
### Fixed
2020

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

2324
## 2.5.5 - 2015-09-03
2425

src/BaseInputFilter.php

-5
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

-18
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)