From fb62ad449af3a59b71eb219c90ce1dbaf33f7d5d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 6 Oct 2017 15:29:09 +0200 Subject: add patches for PHP 7.2 --- b2f20b33942c2c84bc3b3b169098b448b3e66737.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 b2f20b33942c2c84bc3b3b169098b448b3e66737.patch (limited to 'b2f20b33942c2c84bc3b3b169098b448b3e66737.patch') diff --git a/b2f20b33942c2c84bc3b3b169098b448b3e66737.patch b/b2f20b33942c2c84bc3b3b169098b448b3e66737.patch new file mode 100644 index 0000000..f1e4055 --- /dev/null +++ b/b2f20b33942c2c84bc3b3b169098b448b3e66737.patch @@ -0,0 +1,23 @@ +From b2f20b33942c2c84bc3b3b169098b448b3e66737 Mon Sep 17 00:00:00 2001 +From: Craig Duncan +Date: Fri, 7 Apr 2017 09:43:56 +0100 +Subject: [PATCH] Avoid warnings in PHP 7.2 from count() + +--- + library/Mockery/Expectation.php | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/library/Mockery/Expectation.php b/library/Mockery/Expectation.php +index bccf82ec..b215890c 100644 +--- a/library/Mockery/Expectation.php ++++ b/library/Mockery/Expectation.php +@@ -310,7 +310,8 @@ public function matchArgs(array $args) + if (empty($this->_expectedArgs) && !$this->_noArgsExpectation) { + return true; + } +- if (count($args) !== count($this->_expectedArgs)) { ++ $expected = is_array($this->_expectedArgs) ? count($this->_expectedArgs) : 0; ++ if (count($args) !== $expected) { + return false; + } + $argCount = count($args); -- cgit