I wonder if anyone can confirm this for me, I create my file element with
array notation rather than instantiating, setting the options and passing
the created element to Zend_Form. Since I upgraded to 1.6.2 this morning my
file elements have stopped working with the following errors:
Notice: Undefined index: filters in
C:\www\enginepumps\www\lib\Zend\File\Transfer\Adapter\Abstract.php on line
796
Fatal error: Unsupported operand types in
C:\www\enginepumps\www\lib\Zend\File\Transfer\Adapter\Abstract.php on line
796
This is becuase I don't set any filters... However when creating the element
by instantiating the actual form file element it works perfectly.
This is creating a very simple file element. $this->_moveTo is a valid
directory on the file system.
$this->addElement('file', 'image', array(
'destination' => $this->_moveTo,
));
Doing the same like so works perfectly:
$element = new Zend_Form_Element_File('image');
->setDestination($this->_moveTo);
Can anyone confirm this?
-----
Simon
http://www.ajb007.co.uk/
--
View this message in context:
http://www.nabble.com/Problem-with-Zend_Form-File-Element-tp19979955p19979955.html
Sent from the Zend Framework mailing list archive at Nabble.com.