ZF-7471: Zend_Filter_Input::DEFAULT_VALUE setting can't be array


When defining field rules for Zend_Filter_Input, default value cannot be array.

    $data = array(); // post no data
    $fields = array(
            'names' => array(
                Zend_Filter_Input::DEFAULT_VALUE => array(1, 2, 3),
        $filters = array();

        $zfi = new Zend_Filter_Input($filters, $fields, $data);
        var_dump($zfi->getUnescaped()); // array(1) { ["names"]=>  int(1) }
        // names should be array(1, 2, 3)

In Zend/Filter/Input.php there is still /** @todo according to this code default value can't be an array. It has to be reviewed */. Maybe it's time to get this fixed.


Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.