merged branch vlechemin/ticket_3472 (PR #3473)
Commits
-------
ab47a88
[FrameworkBundle][Translator] Fix test for request being available in order to get the locale.
Discussion
----------
[FrameworkBundle][Translator] Fix test for request being available.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3472
Todo: -
This commit is contained in:
commit
e8c0e07841
@ -65,7 +65,7 @@ class Translator extends BaseTranslator
|
||||
*/
|
||||
public function getLocale()
|
||||
{
|
||||
if (null === $this->locale && $this->container->has('request')) {
|
||||
if (null === $this->locale && $this->container->isScopeActive('request')) {
|
||||
$this->locale = $this->container->get('request')->getLocale();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user