Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.9.3
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Validate_File
-
Labels:None
-
Tags:
Description
File validation by "IsImage" broke upload process. No php warning or error, no validation errors even if file type is incorrect.
Example 1:
$this->addElement('file', 'file', array(
'size' => '40',
'label' => 'Seleccione un archivo de imagen que desea subir.',
'required' => true,
'description' => 'Tipo de archivos permitidos: bmp, gif, jpg, png',
'validators' => array(
'Size' => array('min' => 20000, 'max' => 1000000),
'IsImage' => array('image/bmp', 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/png')
)
));
Example 2:
$this->addElement('file', 'file', array(
'size' => '40',
'label' => 'Seleccione un archivo de imagen que desea subir.',
'required' => true,
'description' => 'Tipo de archivos permitidos: bmp, gif, jpg, png',
'validators' => array(
'Size' => array('min' => 20000, 'max' => 1000000),
'IsImage'
)
));
With ZF 1.9.2 everything is OK!
When the process is broken then there must be a returned value, error message, validation message or exception. Something must be returned.
Or you have changed anything... only updated parts of the framework instead of the complete framework?
Try to call the validator standalone so you can give us something reproducable.
You could also try trunk and see if this issue exists also for the next major release.