From bace28e2eba99fd34cd771a1714a563e3fc3a487 Mon Sep 17 00:00:00 2001 From: Max Hayman Date: Fri, 22 Oct 2021 14:38:44 +0100 Subject: [PATCH] switch from @count() to empty(). Empty checks if the value is set where as count doesn't and causes errors. Similar to 305bf858c1ef44b91913b06291b7ae90c9abe304 (#681) --- libs/Smarty.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 3c97b5fd..41814673 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1208,7 +1208,7 @@ class Smarty $_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS']; $_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3); $_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT'; - if (@count($this->_cache_info['insert_tags']) == 0 + if (empty($this->_cache_info['insert_tags']) && !$this->_cache_serials && $_gmt_mtime == $_last_modified_date) { if (php_sapi_name()=='cgi')