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

Issue Type: Bug Created: 2008-09-05T07:45:09.000+0000 Last Updated: 2008-09-05T09:19:59.000+0000 Status: Resolved Fix version(s): - 1.6.1 (15/Sep/08)

Reporter: Patrick Barroca (patbator) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate_File

Related issues: Attachments:


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.


Posted by Thomas Weidner (thomas) on 2008-09-05T09:19:21.000+0000

The code reads:

<pre class="highlight">        if (empty($max)) {
            $max = $min;
            $min = 0;

since 11.August.

Posted by Thomas Weidner (thomas) on 2008-09-05T09:19:59.000+0000

Fixed in past with r10886

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.