mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-11 21:06:21 +00:00
simplified some code
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user