Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Not an Issue
-
Affects Version/s: 1.6.0
-
Fix Version/s: 1.6.1
-
Component/s: Zend_Validate_File
-
Labels:None
Description
In the doc, the example usage of Zend_Validate_File_Size says "->addValidator('Size', false, 102400) // limit to 100K" (http://framework.zend.com/manual/fr/zend.form.standardElements.html).
I andurstand this as limiting up to 100K not requiring the file to be exactly 100K, Am i wrong ?
By the way, the code of Zend_Validate_File_Size is requiring the file to match exactly the given size, line 110 :
if (empty($max)) {
$max = $min;
}
In my opinion we need a code change to specify only the max limit or a change in the docs.
The code reads:
if (empty($max)) { $max = $min; $min = 0; }since 11.August.
if (empty($max)) { $max = $min; $min = 0; }