8000 Fix #17306 Paths with % in it are note allowed (like urlencoded) · symfony/symfony@de7b4d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit de7b4d7

Browse files
author
Pavel Batanov
committed
Fix #17306 Paths with % in it are note allowed (like urlencoded)
1 parent 5d63c55 commit de7b4d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,17 +562,17 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
562562
$dirs[] = dirname($r->getFileName()).'/../../Resources/translations';
563563
}
564564
}
565-
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
565+
$rootDir = $container->getParameter('kernel.root_dir');
566566
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
567567
$reflection = new \ReflectionClass($class);
568568
if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/translations')) {
569569
$dirs[] = $dir;
570570
}
571-
if (is_dir($dir = sprintf($overridePath, $bundle))) {
571+
if (is_dir($dir = $rootDir.sprintf('/Resources/%s/translations', $bundle))) {
572572
$dirs[] = $dir;
573573
}
574574
}
575-
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/translations')) {
575+
if (is_dir($dir = $rootDir.'/Resources/translations')) {
576576
$dirs[] = $dir;
577577
}
578578

0 commit comments

Comments
 (0)
0