-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[4.2] Make "findClosure" Actually Find Closures #6567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Good catch (this has been like this for ages) but why not just use |
|
Roger that, Mr. JoostK |
|
You can further simplify it to just |
|
Sorry, I just a newbie and try to make this working out. Once again thank you Mr. JoostK |
|
Please squash to one commit. |
|
If you don't know how to squash: http://davidwalsh.name/squash-commits-git |
Return of method findClosure() is Closure Object that is callable and must be an object. So only using is_callabel() function isn't enough. A string could be callable, example when you adding alias 'app' in your route.
Route::get('apps', array('as' => 'app', function()
{
//
})); will make an error.
change is_object to ($value instanceOf \Closure)
we just need $value instanceOf Closure;
|
Is it done, right? |
|
Yeah mate looks good. 👍 |
|
Thank's all.. |
|
It should just be findCallable then. |
Return of method findClosure() is Closure Object that is callable and must be an object. So only using is_callable() function isn't enough. A string could be callable, example when you adding alias 'app' in your route.
Route::get('apps', array('as' => 'app', function()
{
//
})); will make an error.