diff --git a/composer.json b/composer.json index 4cbc3f0..372d1f9 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "guzzlehttp/guzzle": "^6.3|^7.0", + "guzzlehttp/guzzle": "^7.0", "PHP": "^7.1", "kornrunner/keccak": "~1.0", "phpseclib/phpseclib": "~2.0.11", diff --git a/src/Contract.php b/src/Contract.php index 87ad1fc..25843f4 100644 --- a/src/Contract.php +++ b/src/Contract.php @@ -587,6 +587,8 @@ class Contract $method = array_splice($arguments, 0, 1)[0]; $callback = array_pop($arguments); + $arguments = is_array($arguments[0]) ? $arguments[0] : $arguments; + if (!is_string($method)) { throw new InvalidArgumentException('Please make sure the method is string.'); }