Strict in_array check in Parser.php

Otherwise it doesn't throw an error for the cases when passed parameters array includes zero key.
This commit is contained in:
parnas 2014-04-01 11:52:52 +02:00 committed by Fabien Potencier
parent 0515fe3eff
commit e46513557a

View File

@ -190,7 +190,7 @@ class Parser
$node = new Node\FunctionNode($token->value, $this->parseArguments());
} else {
if (!in_array($token->value, $this->names)) {
if (!in_array($token->value, $this->names, true)) {
throw new SyntaxError(sprintf('Variable "%s" is not valid', $token->value), $token->cursor);
}