From 5b70506cf318282378a5b2c750d36df16f7c43e5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 4 Aug 2017 10:11:22 +0200 Subject: v2.9.2 --- php-zendframework-zend-validator-pr190.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 php-zendframework-zend-validator-pr190.patch (limited to 'php-zendframework-zend-validator-pr190.patch') 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 +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) { -- cgit