8000 [FrameworkBundle] Fix paths with % in it (like urlencoded) by scaytrase · Pull Request #17307 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Fix paths with % in it (like urlencoded) #17307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
< 8000 h5 data-view-component="true" class="mb-2"> Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -562,17 +562,17 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
$dirs[] = dirname($r->getFileName()).'/../../Resources/translations';
}
}
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
$rootDir = $container->getParameter('kernel.root_dir');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 575 can reuse $rootDir

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tobion updated

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;
}

Expand Down
0