-
Notifications
You must be signed in to change notification settings - Fork 136
Conversation
https://travis-ci.org/zendframework/zend-validator/jobs/246138892#L347 |
Already fixed with zendframework/zend-session#78, in fact |
src/File/Upload.php
Outdated
@@ -109,7 +110,7 @@ public function getFiles($file = null) | |||
*/ | |||
public function setFiles($files = []) | |||
{ | |||
if (count($files) === 0) { | |||
if ((is_array($files) || $files instanceof Countable) && count($files) === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note
This bug highlights a higher priority bug in this method: the argument type isn't checked.
But to lessen the complexity of the PR and to speed up the next release, here I'm doing the minimum to get the code to work exactly like before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it seems I was wrong: https://3v4l.org/Efkoc
So I guess a $_FILES
test case is missing; condition changed.
Add PHP 7.2 support, drop HHVM Conflicts: .travis.yml
Thanks, @Slamdunk. |
.travis.yml
ZF standards (zend-session/.travis.yml picked)idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated
count(): Parameter must be an array or an object that implements Countable