From b1e8893fdebe4636b8e73dfba112ae04d2f0cce9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 23 Oct 2015 08:46:55 +0200 Subject: [PATCH] simplified some code --- lib/Twig/Environment.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index e5b556282..3efd8b8c2 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -989,9 +989,7 @@ class Twig_Environment if (!array_key_exists($name, $this->globals)) { throw new LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name)); } - } - if ($this->extensionInitialized || $this->runtimeInitialized) { // update the value $this->globals[$name] = $value; } else {