From: Fabien Potencier Date: Thu, 6 Jan 2011 07:03:47 +0000 (+0100) Subject: fixed cache option initialization X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d2d63bd11b724ccdf20c7f8d50d10498c5705fd3;p=web%2Fkonrad%2Ftwig.git fixed cache option initialization --- diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index 3a5c034..48af99a 100644 --- 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; } /**