diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php index 61618449d..c77ae9e17 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -196,12 +196,8 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource */ public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached) { - if (version_compare(PHP_VERSION, '5.3.0', '>=')) { - clearstatcache(true, $cached->lock_id); - } else { - clearstatcache(); - } - if (is_file($cached->lock_id)) { + clearstatcache(true, $cached->lock_id ?? ''); + if (null !== $cached->lock_id && is_file($cached->lock_id)) { $t = filemtime($cached->lock_id); return $t && (time() - $t < $smarty->locking_timeout); } else { |