Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
bug #600 Fix checking of invokable object controllers in ParamConvert…
Browse files Browse the repository at this point in the history
…erListener (jaikdean)

This PR was merged into the 5.2.x-dev branch.

Discussion
----------

Fix checking of invokable object controllers in ParamConverterListener

This fixes #599

Commits
-------

4374de4 Fix checking of invokable object controllers in ParamConverterListener
  • Loading branch information
fabpot committed Dec 11, 2018
2 parents 1032c70 + 4374de4 commit 1fdf591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EventListener/ParamConverterListener.php
Expand Up @@ -64,7 +64,7 @@ public function onKernelController(FilterControllerEvent $event)

if (\is_array($controller)) {
$r = new \ReflectionMethod($controller[0], $controller[1]);
} elseif (\is_object($controller) && \is_callable($controller, '__invoke')) {
} elseif (\is_object($controller) && \is_callable([$controller, '__invoke'])) {
$r = new \ReflectionMethod($controller, '__invoke');
} else {
$r = new \ReflectionFunction($controller);
Expand Down

0 comments on commit 1fdf591

Please sign in to comment.