schmittjoh/JMSTwigJsBundle — pull request #19 by stefk (2012-11-07 20:26:43+00:00)
Title: Fixing operator precedence issue in TransFilterCompiler

These days I've noticed that the twigjs templates of the application I'm working on were always translated with the fallback locale. I've found out it was due to the following expression of the *TransFilterCompiler#compile* method :

`if (!$locale = $compiler->getDefine('locale') || !$this->translator instanceof Translator) ...`

The '||' operator having a higher precedence than the assignment operator, the *$locale* variable is always assigned with the value of the '||' expression, i.e. a boolean value. Consequently, the translator is unable to load the expected catalogue and defaults to the fallback one.

I assume the problem occured with the last dependencies update I've made, because I've never encountered such a behaviour, and I honestly don't know how this line of code could work as expected.