Skip to content

Commit

Permalink
minor twigphp#1885 simplified some code (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.0-dev branch.

Discussion
----------

simplified some code

Commits
-------

b1e8893 simplified some code
  • Loading branch information
fabpot committed Oct 25, 2015
2 parents 66e2275 + b1e8893 commit f2664dd
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/Twig/Environment.php
Expand Up @@ -995,9 +995,7 @@ public function addGlobal($name, $value)
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 {
Expand Down

0 comments on commit f2664dd

Please sign in to comment.