Fix #17306 Paths with % in it are note allowed (like urlencoded)
This commit is contained in:
parent
5d63c554e8
commit
de7b4d73c6
@ -562,17 +562,17 @@ class FrameworkExtension extends Extension
|
||||
$dirs[] = dirname($r->getFileName()).'/../../Resources/translations';
|
||||
}
|
||||
}
|
||||
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
|
||||
$rootDir = $container->getParameter('kernel.root_dir');
|
||||
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
|
||||
$reflection = new \ReflectionClass($class);
|
||||
if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/translations')) {
|
||||
$dirs[] = $dir;
|
||||
}
|
||||
if (is_dir($dir = sprintf($overridePath, $bundle))) {
|
||||
if (is_dir($dir = $rootDir.sprintf('/Resources/%s/translations', $bundle))) {
|
||||
$dirs[] = $dir;
|
||||
}
|
||||
}
|
||||
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/translations')) {
|
||||
if (is_dir($dir = $rootDir.'/Resources/translations')) {
|
||||
$dirs[] = $dir;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user