ZF-4201: Zend_Validate_File_Size, used with only one param require the file to be of exact size


In the doc, the example usage of Zend_Validate_File_Size says "->addValidator('Size', false, 102400) // limit to 100K" (…).

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.

Fixed in past with r10886