summaryrefslogtreecommitdiffstats
path: root/b2f20b33942c2c84bc3b3b169098b448b3e66737.patch
diff options
context:
space:
mode:
Diffstat (limited to 'b2f20b33942c2c84bc3b3b169098b448b3e66737.patch')
-rw-r--r--b2f20b33942c2c84bc3b3b169098b448b3e66737.patch23
1 files changed, 23 insertions, 0 deletions
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 <git@duncanc.co.uk>
+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);