mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-04 22:47:21 +00:00
fixed PHP 5.2 compat
This commit is contained in:
@@ -50,7 +50,9 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface
|
||||
$dir = dirname($key);
|
||||
if (!is_dir($dir)) {
|
||||
if (false === @mkdir($dir, 0777, true)) {
|
||||
clearstatcache(true, $dir);
|
||||
if (PHP_VERSION_ID >= 50300) {
|
||||
clearstatcache(true, $dir);
|
||||
}
|
||||
if (!is_dir($dir)) {
|
||||
throw new RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user