summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-validator-pr190.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-zendframework-zend-validator-pr190.patch')
-rw-r--r--php-zendframework-zend-validator-pr190.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/php-zendframework-zend-validator-pr190.patch b/php-zendframework-zend-validator-pr190.patch
new file mode 100644
index 0000000..1d46933
--- /dev/null
+++ b/php-zendframework-zend-validator-pr190.patch
@@ -0,0 +1,28 @@
+From 61969df070bbfa3e889b253738828064b8ff211b Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 4 Aug 2017 09:59:14 +0200
+Subject: [PATCH] fix for PHP 7.2, count(): Parameter must be an array or an
+ object that implements Countable
+
+---
+ src/File/Upload.php | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/File/Upload.php b/src/File/Upload.php
+index 55025f63..b03dc4a6 100644
+--- a/src/File/Upload.php
++++ b/src/File/Upload.php
+@@ -109,10 +109,10 @@ public function getFiles($file = null)
+ */
+ public function setFiles($files = [])
+ {
+- if (count($files) === 0) {
+- $this->options['files'] = $_FILES;
+- } else {
++ if (is_array($files) && count($files) > 0) {
+ $this->options['files'] = $files;
++ } else {
++ $this->options['files'] = $_FILES;
+ }
+
+ if ($this->options['files'] === null) {