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:
parent
0515fe3eff
commit
e46513557a
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user