Skip to content
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

[TwigBridge] Removed strict check when found variables inside a translation #10643

Closed
wants to merge 1 commit into from

Conversation

goetas
Copy link
Contributor

@goetas goetas commented Apr 7, 2014

Q A
Bug fix? yes
New feature? no
BC breaks? no?
Deprecations? no
Tests pass? yes
Fixed tickets #10638
License MIT

@jakzal
Copy link
Contributor

jakzal commented Apr 8, 2014

Tests are broken on PHP 5.3.

@goetas
Copy link
Contributor Author

goetas commented Apr 8, 2014

I've fixed the tests. May be useful to create a single commit?

@@ -36,7 +36,7 @@ public function compile(\Twig_Compiler $compiler)
$defaults = $this->getNode('vars');
$vars = null;
}
list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults);
list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults, !!$vars);
Copy link
Member

Choose a reason for hiding this comment

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

please use (Boolean) to cast to boolean rather than !!. This trick can be used in JS to be shorter, but we don't have this constraint in PHP

@stof stof added the TwigBundle label Apr 9, 2014
@goetas goetas changed the title Removed strict check when found variables inside a translation [TwigBridge] Removed strict check when found variables inside a translation Apr 11, 2014
@goetas
Copy link
Contributor Author

goetas commented Apr 16, 2014

news on this?

@fabpot
Copy link
Member

fabpot commented Apr 28, 2014

Thanks for fixing this bug @goetas.

fabpot added a commit that referenced this pull request Apr 28, 2014
…ide a translation (goetas)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10643).

Discussion
----------

[TwigBridge] Removed strict check when found variables inside a translation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no?
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10638
| License       | MIT

Commits
-------

074191e Removed strict check when found variables inside a translation
@fabpot fabpot closed this Apr 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants