nePrint $node, Environment $env, string $type) : Node { $expression = $node->getNode('node'); if ($this->isSafeFor($type, $expression, $env)) { return $node; } return new InlinePrint($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); } private function escapePrintNode(PrintNode $node, Environment $env, string $type) : Node { if (\false === $type) { return $node; } $expression = $node->getNode('expr'); if ($this->isSafeFor($type, $expression, $env)) { return $node; } $class = \get_class($node); return new $class($this->getEscaperFilter($type, $expression), $node->getTemplateLine()); } private function preEscapeFilterNode(FilterExpression $filter, Environment $env) : FilterExpression { $name = $filter->getNode('filter')->getAttribute('value'); $type = $env->getFilter($name)->getPreEscape(); if (null === $type) { return $filter; } $node = $filter->getNode('node'); if ($this->isSafeFor($type, $node, $env)) { return $filter; } $filter->setNode('node', $this->getEscaperFilter($type, $node)); return $filter; } private function isSafeFor(string $type, Node $expression, Environment $env) : bool { $safe = $this->safeAnalysis->getSafe($expression); if (null === $safe) { if (null === $this->traverser) { $this->traverser = new NodeTraverser($env, [$this->safeAnalysis]); } $this->safeAnalysis->setSafeVars($this->safeVars); $this->traverser->traverse($expression); $safe = $this->safeAnalysis->getSafe($expression); } return \in_array($type, $safe) || \in_array('all', $safe); } private function needEscaping(Environment $env) { if (\count($this->statusStack)) { return $this->statusStack[\count($this->statusStack) - 1]; } return $this->defaultStrategy ? $this->defaultStrategy : \false; } private function getEscaperFilter(string $type, Node $node) : FilterExpression { $line = $node->getTemplateLine(); $name = new ConstantExpression('escape', $line); $args = new Node([new ConstantExpression($type, $line), new ConstantExpression(null, $line), new ConstantExpression(\true, $line)]); return new FilterExpression($node, $name, $args, $line); } public function getPriority() : int { return 0; } }
Fatal error: Uncaught Error: Class "MailPoetVendor\Twig\NodeVisitor\EscaperNodeVisitor" not found in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Extension/EscaperExtension.php:24 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/ExtensionSet.php(326): MailPoetVendor\Twig\Extension\EscaperExtension->getNodeVisitors() #1 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/ExtensionSet.php(298): MailPoetVendor\Twig\ExtensionSet->initExtension(Object(MailPoetVendor\Twig\Extension\EscaperExtension)) #2 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/ExtensionSet.php(277): MailPoetVendor\Twig\ExtensionSet->initExtensions() #3 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Environment.php(416): MailPoetVendor\Twig\ExtensionSet->getUnaryOperators() #4 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Lexer.php(362): MailPoetVendor\Twig\Environment->getUnaryOperators() #5 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Lexer.php(52): MailPoetVendor\Twig\Lexer->getOperatorRegex() #6 /htdocs/wp-content/plugins/mailpoet/lib/Config/Renderer.php(90): MailPoetVendor\Twig\Lexer->__construct(Object(MailPoet\Config\TwigEnvironment), Array) #7 /htdocs/wp-content/plugins/mailpoet/lib/Config/Renderer.php(47): MailPoet\Config\Renderer->setupSyntax() #8 /htdocs/wp-content/plugins/mailpoet/lib/Config/RendererFactory.php(20): MailPoet\Config\Renderer->__construct(false, '/htdocs/wp-cont...', Object(MailPoetVendor\Twig\Loader\FilesystemLoader), false) #9 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2319): MailPoet\Config\RendererFactory->getRenderer() #10 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2273): MailPoetGenerated\FreeCachedContainer->getRendererService() #11 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #12 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #13 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #14 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #15 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(206): require_once('/htdocs/wp-cont...') #16 /htdocs/wp-settings.php(462): include_once('/htdocs/wp-cont...') #17 /htdocs/wp-config.php(96): require_once('/htdocs/wp-sett...') #18 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #19 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #20 /htdocs/index.php(17): require('/htdocs/wp-blog...') #21 {main} thrown in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Extension/EscaperExtension.php on line 24