mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-20 02:35:25 +00:00
added template line number to sandbox security check calls
This commit is contained in:
@@ -33,9 +33,12 @@ class CheckToStringNode extends AbstractExpression
|
||||
|
||||
public function compile(Compiler $compiler)
|
||||
{
|
||||
$expr = $this->getNode('expr');
|
||||
$compiler
|
||||
->raw('$this->sandbox->ensureToStringAllowed(')
|
||||
->subcompile($this->getNode('expr'))
|
||||
->subcompile($expr)
|
||||
->raw(', ')
|
||||
->repr($expr->getTemplateLine())
|
||||
->raw(', $this->source)')
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user