Description
- Laravel Version: 5.5.44
- PHP Version: 7.2.9
- Database Driver & Version:
Description:
it seems when I use app()->call(... and I pass the second argument as an array of parameters
in case the parameters array begins with a closure the actual the method is called with wrong parameters.
the first parameters becomes an empty sting and the rest are the actual parameters.
The actual parameters passed into app()->call is like this :
but it seems laravel IOC adds an empty string at the beginning of the array and the method is called with 3 arguments in this case.
Steps To Reproduce:
- you can clone the https://github.com/imanghafoori1/laravel-heyman repo
- check out the devel branch.
- composer install
see :
Imanghafoori\HeyMan\Conditions\ConditionsFacade class at line 12
and
Imanghafoori\HeyMan\Conditions\Traits\Callbacks line 9
see the comments there as a hint
run the tests and they pass
if you remove the $emptyString parameter from 'closureAllows' and 'methodAllows' method tests fail.
there is no reason for that parameter to exist.