We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 065da57 commit 424607aCopy full SHA for 424607a
library/Zend/Validate/File/Count.php
@@ -253,16 +253,13 @@ public function isValid($value, $file = null)
253
if (($file === null) || !empty($file['tmp_name'])) {
254
$this->addFile($value);
255
}
256
-
257
- $this->_count = count($this->_files);
+ $this->_count = $this->_files !== null ? count($this->_files) : 0;
258
if (($this->_max !== null) && ($this->_count > $this->_max)) {
259
return $this->_throw($file, self::TOO_MANY);
260
261
262
if (($this->_min !== null) && ($this->_count < $this->_min)) {
263
return $this->_throw($file, self::TOO_FEW);
264
265
266
return true;
267
268
0 commit comments