- bugfix under HHVM temporary cache file must only be created when caches template was updated

This commit is contained in:
uwetews
2015-10-18 05:08:03 +02:00
parent 4776491a7f
commit bf6910ee21
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
* used in included file
*/
$_smarty_tpl = $_template;
if ($update && defined('HHVM_VERSION')) {
if ($update && strpos(phpversion(), 'hhvm') !== false) {
return Smarty_Internal_Extension_Hhvm::includeHhvm($_template, $_template->cached->filepath);
} else {
return @include $_template->cached->filepath;

View File

@@ -182,7 +182,7 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
opcache_invalidate($_template->compiled->filepath);
}
$_smarty_tpl = $_template;
if (defined('HHVM_VERSION')) {
if (strpos(phpversion(), 'hhvm') !== false) {
Smarty_Internal_Extension_Hhvm::includeHhvm($_template, $_template->compiled->filepath);
} else {
include($_template->compiled->filepath);