projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2f5c989
)
fixed CS
author
Fabien Potencier
<fabien.potencier@gmail.com>
Sun, 4 Aug 2013 13:08:44 +0000 (15:08 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Sun, 4 Aug 2013 13:08:44 +0000 (15:08 +0200)
lib/Twig/Environment.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Environment.php
b/lib/Twig/Environment.php
index
3967d78
..
d11df2e
100644
(file)
--- a/
lib/Twig/Environment.php
+++ b/
lib/Twig/Environment.php
@@
-266,10
+266,11
@@
class Twig_Environment
{
$suffix = null === $index ? '' : '_'.$index;
$cls = $name.$suffix;
- if (!isset($this->templateClasses[$cls])) {
- $this->templateClasses[$cls] = $this->templateClassPrefix.md5($this->getLoader()->getCacheKey($name)).$suffix;
+ if (isset($this->templateClasses[$cls])) {
+ return $this->templateClasses[$cls];
}
- return $this->templateClasses[$cls];
+
+ return $this->templateClasses[$cls] = $this->templateClassPrefix.md5($this->getLoader()->getCacheKey($name)).$suffix;
}
/**