Skip to content

Commit f32d633

Browse files
[HttpKernel] Fix creating ReflectionMethod with only one argument
1 parent 9344c26 commit f32d633

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/Event/ControllerEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function setController(callable $controller, ?array $attributes = null):
7070
if (\is_array($controller) && method_exists(...$controller)) {
7171
$this->controllerReflector = new \ReflectionMethod(...$controller);
7272
} elseif (\is_string($controller) && str_contains($controller, '::')) {
73-
$this->controllerReflector = new \ReflectionMethod($controller);
73+
$this->controllerReflector = new \ReflectionMethod(...explode('::', $controller, 2));
7474
} else {
7575
$this->controllerReflector = new \ReflectionFunction($controller(...));
7676
}

0 commit comments

Comments
 (0)