Skip to content

[Expression Language] fix foo[index] #10042

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

Closed
wants to merge 1 commit into from

Conversation

hinzundcode
Copy link

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

This patch fixes the usage of variables as key in GetAttrNode.

$language = new \Symfony\Component\ExpressionLanguage\ExpressionLanguage();
$language->evaluate('foo[i]', ['foo' => ['a', 'b', 'c'], 'i' => 1]); // 'b'

@fabpot
Copy link
Member

fabpot commented Jan 17, 2014

Good catch, thanks @schokocappucino.

fabpot added a commit that referenced this pull request Jan 17, 2014
This PR was submitted for the 2.4-dev branch but it was merged into the 2.4 branch instead (closes #10042).

Discussion
----------

[Expression Language] fix foo[index]

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

This patch fixes the usage of variables as key in GetAttrNode.

```php
$language = new \Symfony\Component\ExpressionLanguage\ExpressionLanguage();
$language->evaluate('foo[i]', ['foo' => ['a', 'b', 'c'], 'i' => 1]); // 'b'
```

Commits
-------

f657d03 [Expression Language] fix foo[index]
@wouterj
Copy link
Member

wouterj commented Jan 17, 2014

@fabpot seems like this should be closed now it's merged?

@fabpot fabpot closed this Jan 17, 2014
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

Successfully merging this pull request may close these issues.

3 participants