diff options
author | diosmosis <benaka@piwik.pro> | 2015-03-06 03:30:34 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-03-06 03:30:34 +0300 |
commit | 71cacb0aca6aeb557e536c2b5b5b687f58f5465f (patch) | |
tree | aa57bd0f090db63530e591b0e8333a00df2b8781 /core | |
parent | ee924ac6597f277abb4ae0ad0deae3704db034c7 (diff) |
Refs #7297, fixing a pro build, do not clear twig file cache if cache directory does not exist.
Diffstat (limited to 'core')
-rw-r--r-- | core/View.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/View.php b/core/View.php index cc4f25dddf..423aaeb278 100644 --- a/core/View.php +++ b/core/View.php @@ -369,7 +369,13 @@ class View implements ViewInterface $twig = new Twig(); $environment = $twig->getTwigEnvironment(); $environment->clearTemplateCache(); - $environment->clearCacheFiles(); + + $cacheDirectory = $environment->getCache(); + if (!empty($cacheDirectory) + && is_dir($cacheDirectory) + ) { + $environment->clearCacheFiles(); + } } /** |