From bf6910ee218c62e6ff59de486c90d12b24c86058 Mon Sep 17 00:00:00 2001 From: uwetews Date: Sun, 18 Oct 2015 05:08:03 +0200 Subject: [PATCH] - bugfix under HHVM temporary cache file must only be created when caches template was updated --- libs/sysplugins/smarty_internal_cacheresource_file.php | 2 +- libs/sysplugins/smarty_template_compiled.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index a438b4bb..dc9a314a 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -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; diff --git a/libs/sysplugins/smarty_template_compiled.php b/libs/sysplugins/smarty_template_compiled.php index f9514473..c13c4208 100644 --- a/libs/sysplugins/smarty_template_compiled.php +++ b/libs/sysplugins/smarty_template_compiled.php @@ -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);