projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
dbc5bdb
)
fixed cache option initialization
author
Fabien Potencier
<fabien.potencier@gmail.com>
Thu, 6 Jan 2011 07:03:47 +0000 (08:03 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Thu, 6 Jan 2011 07:03:47 +0000 (08:03 +0100)
lib/Twig/Environment.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Environment.php
b/lib/Twig/Environment.php
index
3a5c034
..
48af99a
100644
(file)
--- a/
lib/Twig/Environment.php
+++ b/
lib/Twig/Environment.php
@@
-103,9
+103,7
@@
class Twig_Environment
);
$this->strictVariables = (bool) $options['strict_variables'];
$this->runtimeInitialized = false;
- if ($options['cache']) {
- $this->setCache($options['cache']);
- }
+ $this->setCache($options['cache']);
}
/**
@@
-224,11
+222,11
@@
class Twig_Environment
*/
public function setCache($cache)
{
- $this->cache = $cache;
-
- if ($this->cache && !is_dir($this->cache)) {
- mkdir($this->cache, 0777, true);
+ if (!$this->cache) {
+ $this->cache = false;
}
+
+ $this->cache = $cache;
}
/**