mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 10:56:38 +00:00
fixed cache option initialization
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user