If parameters are sent as an array. To avoid problems.

This commit is contained in:
Halil Beycan 2021-12-08 22:23:04 +03:00
parent fb94ea92c5
commit f53de0a61e

View File

@ -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.');
} }