Zend Framework 1.7 to 1.8 Exception caught by form Method getMaxFileSize does not exist
What cause this error message "Exception caught by form Method getMaxFileSize does not exist"
after switching from 1.7 version to 1.8 or more
update: Issue produced by code
->addElement('file', 'avatar', array(
'required' =>开发者_Python百科 false
, 'label' => 'Upload File:'
, 'destination' => '/data/avatar'
, 'filters' => array()
, 'validators' => array(
array('Extension', false, 'jpg,png,gif')
, array('Size', false, 102400)
, array('Count', false, 1)
)
, 'decorators' => $this->groupElementDecorators
))
update2: group decorators is just an array
$groupElementDecorators = array( 'ViewHelper', 'FormElements', 'File', 'Errors');
According to this issue, you must be using the following.
'validators' => array(
array('Size', false, array('min' => '3', 'max' => '9'))
)
精彩评论