We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec86223 + 63d0eda commit 6ba351aCopy full SHA for 6ba351a
Tests/Node/TransNodeTest.php
@@ -50,7 +50,7 @@ protected function getVariableGetterWithoutStrictCheck($name)
50
protected function getVariableGetterWithStrictCheck($name)
51
{
52
if (Environment::MAJOR_VERSION >= 2) {
53
- return sprintf('(isset($context["%s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name);
+ return sprintf('(isset($context["%1$s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new %2$s(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name, Environment::VERSION_ID >= 20700 ? '\Twig\Error\RuntimeError' : 'Twig_Error_Runtime');
54
}
55
56
return sprintf('($context["%s"] ?? $this->getContext($context, "%1$s"))', $name);
0 commit comments