mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
fixed BC break by allowing null as the cache strategy
This commit is contained in:
@@ -263,6 +263,10 @@ class Twig_Environment
|
||||
} elseif (false === $cache) {
|
||||
$this->originalCache = $cache;
|
||||
$this->cache = new Twig_Cache_Null();
|
||||
} elseif (null === $cache) {
|
||||
@trigger_error('Using "null" as the cache strategy is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED);
|
||||
$this->originalCache = false;
|
||||
$this->cache = new Twig_Cache_Null();
|
||||
} elseif ($cache instanceof Twig_CacheInterface) {
|
||||
$this->originalCache = $this->cache = $cache;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user