[HttpKernel] fixed a crash on some machines (check that the controller is actually a class name before calling method_exists, closes #769)
This commit is contained in:
parent
b3fa8bf7cb
commit
e145bdf6ff
@ -60,7 +60,7 @@ class ControllerResolver implements ControllerResolverInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_array($controller) || method_exists($controller, '__invoke')) {
|
||||
if (is_array($controller) || ((is_object($controller) || false === strpos($controller, ':')) && method_exists($controller, '__invoke'))) {
|
||||
return $controller;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user