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

Ternary operator overrides context #737

Closed
oleg-andreyev opened this issue Apr 20, 2020 · 1 comment
Closed

Ternary operator overrides context #737

oleg-andreyev opened this issue Apr 20, 2020 · 1 comment

Comments

@oleg-andreyev
Copy link
Contributor

Test Case:

{% set classes = ['a', 'b'] %}
{% set classes = classes ? classes|merge(['c']) : '' %}
{{ dump(classes) }}

ER:

object(3) {
   [0]=> string(1) "a"
   [1]=> string(1) "b"
   [2]=> string(1) "c"
}

AR

number(3)

Issue caused by 6654458

It was fixed for ?? 7b3591d

oleg-andreyev added a commit to oleg-andreyev/twig.js-implementation that referenced this issue Apr 20, 2020
…ontext + exporting functions for test purposes
oleg-andreyev added a commit to oleg-andreyev/twig.js-implementation that referenced this issue Apr 20, 2020
…ontext + exporting functions for test purposes
@RobLoach RobLoach mentioned this issue Aug 17, 2020
@willrowe
Copy link
Collaborator

willrowe commented Aug 1, 2022

Fixed by #738.

@willrowe willrowe closed this as completed Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants