diff --git a/libs/core/core.assemble_auto_filename.php b/libs/core/core.assemble_auto_filename.php index 4255c645..c43dee96 100644 --- a/libs/core/core.assemble_auto_filename.php +++ b/libs/core/core.assemble_auto_filename.php @@ -18,7 +18,7 @@ function smarty_core_assemble_auto_filename($params, &$smarty) { - $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'; + $_compile_dir_sep = $smarty->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'; if(@is_dir($params['auto_base'])) { $_return = $params['auto_base'] . DIRECTORY_SEPARATOR; diff --git a/libs/core/core.write_cache_paths_file.php b/libs/core/core.write_cache_paths_file.php index 85e90de9..eac52274 100644 --- a/libs/core/core.write_cache_paths_file.php +++ b/libs/core/core.write_cache_paths_file.php @@ -14,6 +14,9 @@ function smarty_core_write_cache_paths_file($params, &$smarty) { + if (!isset($smarty->_cache_paths_file)) { + return false; + } $_compiled_content = function_exists('var_export') ? var_export($smarty->_cache_paths, true) : "unserialize('" . serialize($smarty->_cache_paths) . "')"; $_compiled_content = '_cache_paths = ' . $_compiled_content . '; ?>'; $_params = array('compile_path' => $smarty->_cache_paths_file, 'compiled_content' => $_compiled_content, 'resource_timestamp' => time());