diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index 17c6e4bf..b8e99cc6 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -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);