If parameters are sent as an array. To avoid problems.
This commit is contained in:
parent
fb94ea92c5
commit
f53de0a61e
@ -587,6 +587,8 @@ class Contract
|
|||||||
$method = array_splice($arguments, 0, 1)[0];
|
$method = array_splice($arguments, 0, 1)[0];
|
||||||
$callback = array_pop($arguments);
|
$callback = array_pop($arguments);
|
||||||
|
|
||||||
|
$arguments = is_array($arguments[0]) ? $arguments[0] : $arguments;
|
||||||
|
|
||||||
if (!is_string($method)) {
|
if (!is_string($method)) {
|
||||||
throw new InvalidArgumentException('Please make sure the method is string.');
|
throw new InvalidArgumentException('Please make sure the method is string.');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user