mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
do not drop none digit characters from generated variable names
This commit is contained in:
@@ -41,7 +41,7 @@ class TempNameExpression extends AbstractExpression
|
||||
public function compile(Compiler $compiler): void
|
||||
{
|
||||
if (null === $this->getAttribute('name')) {
|
||||
$this->setAttribute('name', \sprintf('_l%d', $compiler->getVarName()));
|
||||
$this->setAttribute('name', $compiler->getVarName());
|
||||
}
|
||||
|
||||
$compiler->raw('$'.$this->getAttribute('name'));
|
||||
|
||||
Reference in New Issue
Block a user