From df1855840eff90ed36143967e1594d37343f0d55 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Tue, 10 Jan 2017 12:07:12 +0100 Subject: [PATCH] remove condition on PHP version Twig now requires PHP >= 7 so there is no need to check for prior version. --- lib/Twig/Node/Expression/Name.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/lib/Twig/Node/Expression/Name.php b/lib/Twig/Node/Expression/Name.php index 694f9748e..e1f4d42f8 100644 --- a/lib/Twig/Node/Expression/Name.php +++ b/lib/Twig/Node/Expression/Name.php @@ -44,22 +44,11 @@ class Twig_Node_Expression_Name extends Twig_Node_Expression ; } else { if ($this->getAttribute('ignore_strict_check') || !$compiler->getEnvironment()->isStrictVariables()) { - if (PHP_VERSION_ID >= 70000) { - // use PHP 7 null coalescing operator - $compiler - ->raw('($context[') - ->string($name) - ->raw('] ?? null)') - ; - } else { - $compiler - ->raw('(isset($context[') - ->string($name) - ->raw(']) ? $context[') - ->string($name) - ->raw('] : null)') - ; - } + $compiler + ->raw('($context[') + ->string($name) + ->raw('] ?? null)') + ; } else { $compiler ->raw('(isset($context[')