[FrameworkBundle] TextDescriptor::formatControllerLink checked method…

This commit is contained in:
Frank Jogeleit 2020-12-04 19:08:02 +01:00 committed by Fabien Potencier
parent 626d61ee7d
commit 67bd779ef4
1 changed files with 3 additions and 1 deletions

View File

@ -504,7 +504,9 @@ class TextDescriptor extends Descriptor
}
try {
if (\is_array($controller)) {
if (null === $controller) {
return $anchorText;
} elseif (\is_array($controller)) {
$r = new \ReflectionMethod($controller[0], $controller[1]);
} elseif ($controller instanceof \Closure) {
$r = new \ReflectionFunction($controller);