Skip to content

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