Skip to content

Commit e477980

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: Fixes Undefined method call minor #41065 [Security] Added missing translations for Serbian (sr_Cyrl) [Security] Added missing translations for Serbian (sr_Latn) #41066
2 parents d59fe0b + 81720c6 commit e477980

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Kernel/MicroKernelTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function loadRoutes(LoaderInterface $loader)
182182
throw new \LogicException(sprintf('"%s" uses "%s", but does not implement the required method "protected function configureRoutes(RoutingConfigurator $routes): void".', get_debug_type($this), MicroKernelTrait::class), 0, $e);
183183
}
184184

185-
$configuratorClass = $configureRoutes->getNumberOfParameters() > 0 && ($type = $configureRoutes->getParameters()[0]->getType()) && !$type->isBuiltin() ? $type->getName() : null;
185+
$configuratorClass = $configureRoutes->getNumberOfParameters() > 0 && ($type = $configureRoutes->getParameters()[0]->getType()) instanceof \ReflectionNamedType && !$type->isBuiltin() ? $type->getName() : null;
186186

187187
if ($configuratorClass && !is_a(RoutingConfigurator::class, $configuratorClass, true)) {
188188
trigger_deprecation('symfony/framework-bundle', '5.1', 'Using type "%s" for argument 1 of method "%s:configureRoutes()" is deprecated, use "%s" instead.', RouteCollectionBuilder::class, self::class, RoutingConfigurator::class);

0 commit comments

Comments
 (0)