zendframework/zf2 — pull request #4749 by gag237 (2013-06-29 11:54:09+00:00)
Title: Another fix for #4727

This pull request https://github.com/zendframework/zf2/pull/4734 give problem with null values, and with InputFilter\Input::getValue()

example:

public function testGetNotScalarValue()
{
$filter = $this->getMockBuilder('Zend\Filter\FilterInterface')
->disableOriginalConstructor()
->getMock();

$filter->expects($this->any())
->method('filter')
->will($this->throwException(new \Zend\Filter\Exception\InvalidArgumentException()));
//Filters such as: StripTags, StringToUpper, StringToLower, HtmlEntities throw exception if value is not scalar

$filterChain = new \Zend\Filter\FilterChain();
$filterChain->attach($filter);

$input = new Input();
$input->setFilterChain($filterChain);

$value = null; //or any not scalar value array(), object, closure

$input->setValue($value);

$this->assertSame($value, $input->getValue()); //fail: give exception
$this->assertFalse($input->isValid()); //also give exception

}