Skip to content

Commit a02bd4b

Browse files
committed
bug symfony#17307 [FrameworkBundle] Fix paths with % in it (like urlencoded) (scaytrase)
This PR was merged into the 2.3 branch. Discussion ---------- [FrameworkBundle] Fix paths with % in it (like urlencoded) | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | Travis passed | Fixed tickets | symfony#17306 | License | MIT | Doc PR | none Commits ------- de7b4d7 Fix symfony#17306 Paths with % in it are note allowed (like urlencoded)
2 parents aa9801e + de7b4d7 commit a02bd4b

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)