summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-validator-pr190.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-08-04 10:11:22 +0200
committerRemi Collet <remi@remirepo.net>2017-08-04 10:11:22 +0200
commit5b70506cf318282378a5b2c750d36df16f7c43e5 (patch)
treea137eda2a5dfc09866328a25656e7f04e07f0219 /php-zendframework-zend-validator-pr190.patch
parentae9953adda99a5db86f7bd110e54fe0f4581f52b (diff)
v2.9.2
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) {