From 277648b81cb49cfd1449bc876f874c2421e97af2 Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Tue, 18 Jan 2022 13:59:02 +0100 Subject: [PATCH] Cherry-picked from da76d927ed77fb6b3cb8345b83776712d0778e55 Co-Authored-By: Thomas BACCELLI --- libs/sysplugins/smarty_internal_cacheresource_file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index abed98d8..c77ae9e1 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -196,8 +196,8 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource */ public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached) { - clearstatcache(true, $cached->lock_id); - 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 {