Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2453a58

Browse filesBrowse files
committed
merged branch fabpot/fix-setFallbackLocales (PR #7334)
This PR was merged into the master branch. Commits ------- 44c8654 [FrameworkBundle] fixed regression for the translator fallback configuration (refs #7100, closes #7315) Discussion ---------- [FrameworkBundle] fixed regression for the translator fallback configuration (refs #7100, closes #7315) | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7315 | License | MIT | Doc PR | n/a --------------------------------------------------------------------------- by craue at 2013-03-11T22:09:35Z :+1:
2 parents ea25267 + 44c8654 commit 2453a58
Copy full SHA for 2453a58

File tree

Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,9 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
533533
// Use the "real" translator instead of the identity default
534534
$container->setAlias('translator', 'translator.default');
535535
$translator = $container->findDefinition('translator.default');
536+
if (!is_array($config['fallback'])) {
537+
$config['fallback'] = array($config['fallback']);
538+
}
536539
$translator->addMethodCall('setFallbackLocales', array($config['fallback']));
537540

538541
// Discover translation directories

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public function testTranslator()
219219
);
220220

221221
$calls = $container->getDefinition('translator.default')->getMethodCalls();
222-
$this->assertEquals('fr', $calls[0][1][0]);
222+
$this->assertEquals(array('fr'), $calls[0][1][0]);
223223
}
224224

225225
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.