mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
fix issue where cache dir does not exist
-This line, and those below, will be ignored-- M distribution/libs/sysplugins/smarty_internal_cacheresource_file.php
This commit is contained in:
@@ -147,7 +147,10 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
|
||||
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
|
||||
$_dir_sep = $smarty->use_sub_dirs ? '/' : '^';
|
||||
$_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0;
|
||||
$_dir = realpath($smarty->getCacheDir()) . '/';
|
||||
if (($_dir = realpath($smarty->getCacheDir())) === false) {
|
||||
return 0;
|
||||
}
|
||||
$_dir .= '/';
|
||||
$_dir_length = strlen($_dir);
|
||||
if (isset($_cache_id)) {
|
||||
$_cache_id_parts = explode('|', $_cache_id);
|
||||
|
Reference in New Issue
Block a user