bug #37020 [ExpressionLanguage] reset the internal state when the parser 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
-------

d58eb020d0 reset the internal state when the parser is finished
This commit is contained in:
Fabien Potencier 2020-06-02 10:46:57 +02:00
commit ab3772a94e

View File

@ -124,6 +124,9 @@ class Parser
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;
}