Skip to content

Commit 63fbf25

Browse files
committed
Merge branch '4.2'
* 4.2: the string "0" is a valid service identifier remove unreachable code
2 parents c1ff635 + 6c69cfc commit 63fbf25

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Tests/Node/TransNodeTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ protected function getVariableGetterWithoutStrictCheck($name)
4949

5050
protected function getVariableGetterWithStrictCheck($name)
5151
{
52-
if (Environment::VERSION_ID > 20404) {
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);
54-
}
55-
5652
if (Environment::MAJOR_VERSION >= 2) {
57-
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->getSourceContext()); })())', $name);
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);
5854
}
5955

6056
return sprintf('($context["%s"] ?? $this->getContext($context, "%1$s"))', $name);

0 commit comments

Comments
 (0)