From f79395851b044689567e0e6c9504acbcaa742782 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Tue, 26 Feb 2019 10:11:12 +1000 Subject: Twig update to latest Twig 1.x legacy as per vichan --- inc/lib/Twig/Node/SandboxedPrint.php | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'inc/lib/Twig/Node/SandboxedPrint.php') diff --git a/inc/lib/Twig/Node/SandboxedPrint.php b/inc/lib/Twig/Node/SandboxedPrint.php index 73dfaa96..a08f21f5 100644 --- a/inc/lib/Twig/Node/SandboxedPrint.php +++ b/inc/lib/Twig/Node/SandboxedPrint.php @@ -3,7 +3,7 @@ /* * This file is part of Twig. * - * (c) 2010 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,21 +21,11 @@ */ class Twig_Node_SandboxedPrint extends Twig_Node_Print { - public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) - { - parent::__construct($expr, $lineno, $tag); - } - - /** - * Compiles the node to PHP. - * - * @param Twig_Compiler A Twig_Compiler instance - */ public function compile(Twig_Compiler $compiler) { $compiler ->addDebugInfo($this) - ->write('echo $this->env->getExtension(\'sandbox\')->ensureToStringAllowed(') + ->write('echo $this->env->getExtension(\'Twig_Extension_Sandbox\')->ensureToStringAllowed(') ->subcompile($this->getNode('expr')) ->raw(");\n") ; @@ -46,9 +36,9 @@ class Twig_Node_SandboxedPrint extends Twig_Node_Print * * This is mostly needed when another visitor adds filters (like the escaper one). * - * @param Twig_Node $node A Node + * @return Twig_Node */ - protected function removeNodeFilter($node) + protected function removeNodeFilter(Twig_Node $node) { if ($node instanceof Twig_Node_Expression_Filter) { return $this->removeNodeFilter($node->getNode('node')); @@ -57,3 +47,5 @@ class Twig_Node_SandboxedPrint extends Twig_Node_Print return $node; } } + +class_alias('Twig_Node_SandboxedPrint', 'Twig\Node\SandboxedPrintNode', false); -- cgit v1.3