Skip to content

Commit

Permalink
bug #37020 [ExpressionLanguage] reset the internal state when the par…
Browse files Browse the repository at this point in the history
…ser is finished (xabbuh)

This PR was merged into the 5.1 branch.

Discussion
----------

[ExpressionLanguage] reset the internal state when the parser is finished

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

d58eb02 reset the internal state when the parser is finished
  • Loading branch information
fabpot committed Jun 2, 2020
2 parents 73fed65 + d58eb02 commit ab3772a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Symfony/Component/ExpressionLanguage/Parser.php
Expand Up @@ -124,6 +124,9 @@ private function doParse(TokenStream $stream, ?array $names = []): Node\Node
throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
}

$this->stream = null;
$this->names = null;

return $node;
}

Expand Down

0 comments on commit ab3772a

Please sign in to comment.