stof/StofDoctrineExtensionsBundle — Issue #70: getLocale error for symfony 2.04
Author: png-tech
Created: 2011-10-10 07:52:47+00:00
State: open

I am used symfony 2.04.

file StofDoctrineExtensionsBundle / Listener / TranslationListener.php

Fatal error: Call to undefined method Symfony\Component\HttpFoundation\Request::getLocale() in /www/mysite/vendor/bundles/Stof/DoctrineExtensionsBundle/Listener/TranslationListener.php on line 38

fixing problem!
- $this->setTranslatableLocale($event->getRequest()->getLocale());
+ $this->setTranslatableLocale($event->getRequest()->getSession()->getLocale());