Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
In PHP < 7.2 0 === count(null)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Jun 23, 2017
1 parent 1a0717c commit 407ee84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/File/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getFiles($file = null)
*/
public function setFiles($files = [])
{
if ((is_array($files) || $files instanceof Countable) && count($files) === 0) {
if (null === $files || ((is_array($files) || $files instanceof Countable) && count($files) === 0)) {
$this->options['files'] = $_FILES;
} else {
$this->options['files'] = $files;
Expand Down

0 comments on commit 407ee84

Please sign in to comment.