Skip to content

Commit

Permalink
Restores php 5 compatibility to count.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Shardj committed Dec 4, 2019
1 parent 1d2a28e commit f5fd9dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Validate/File/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public function isValid($value, $file = null)
$this->addFile($value);
}

$this->_count = count($this->_files ?? []);
$this->_count = count($this->_files === null ? [] : $this->_files);
if (($this->_max !== null) && ($this->_count > $this->_max)) {
return $this->_throw($file, self::TOO_MANY);
}
Expand Down

0 comments on commit f5fd9dd

Please sign in to comment.