mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
Update Twig to v2.15.4
This commit is contained in:
@@ -20,7 +20,7 @@ use Twig\Compiler;
|
||||
*/
|
||||
class SandboxNode extends Node
|
||||
{
|
||||
public function __construct(\Twig_NodeInterface $body, $lineno, $tag = null)
|
||||
public function __construct(Node $body, int $lineno, string $tag = null)
|
||||
{
|
||||
parent::__construct(['body' => $body], [], $lineno, $tag);
|
||||
}
|
||||
@@ -34,12 +34,19 @@ class SandboxNode extends Node
|
||||
->write("\$this->sandbox->enableSandbox();\n")
|
||||
->outdent()
|
||||
->write("}\n")
|
||||
->write("try {\n")
|
||||
->indent()
|
||||
->subcompile($this->getNode('body'))
|
||||
->outdent()
|
||||
->write("} finally {\n")
|
||||
->indent()
|
||||
->write("if (!\$alreadySandboxed) {\n")
|
||||
->indent()
|
||||
->write("\$this->sandbox->disableSandbox();\n")
|
||||
->outdent()
|
||||
->write("}\n")
|
||||
->outdent()
|
||||
->write("}\n")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user