From 8dfd26361f4a5335571a5a10568e9dfc55a8a4b1 Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 2 Jul 2026 13:06:32 +0800 Subject: [PATCH] Update webstats_common.lua --- plugins/webstats/lua/webstats_common.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index e34ff004c..10ead4c48 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -275,9 +275,11 @@ function _M.cron(self) return true end - for k, _ in pairs(stmt_caches) do - for key, _ in pairs(stmt_caches[k]) do - stmt_caches[k][key] = nil + for k, v in pairs(stmt_caches) do + if v then + for key, _ in pairs(v) do + v[key] = nil + end end end