[HttpKernel] Prevent calling method_exists() with non-string values.
This commit is contained in:
parent
52abcbeec9
commit
1bbfdcbb8d
@ -77,7 +77,7 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve
|
||||
throw new \InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.', \get_class($controller), $request->getPathInfo()));
|
||||
}
|
||||
|
||||
if (false === strpos($controller, ':')) {
|
||||
if (\is_string($controller) && false === strpos($controller, ':')) {
|
||||
if (method_exists($controller, '__invoke')) {
|
||||
return $this->instantiateController($controller);
|
||||
} elseif (\function_exists($controller)) {
|
||||
|
Reference in New Issue
Block a user