simplified some code

This commit is contained in:
Fabien Potencier
2015-10-23 08:46:55 +02:00
parent 112c511260
commit b1e8893fde
-2
View File
@@ -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 {