mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-21 15:48:42 +00:00
Merge branch '2.x' into 3.x
* 2.x: Add a test Added token type and value to error message Add phpdoc to SecurityPolicyInterface
This commit is contained in:
@@ -485,7 +485,7 @@ class ExpressionParser
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new SyntaxError('Expected name or number.', $lineno, $stream->getSourceContext());
|
||||
throw new SyntaxError(sprintf('Expected name or number, got value "%s" of type %s.', $token->getValue(), Token::typeToEnglish($token->getType())), $lineno, $stream->getSourceContext());
|
||||
}
|
||||
|
||||
if ($node instanceof NameExpression && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) {
|
||||
|
||||
Reference in New Issue
Block a user