From 2e9f01d3eeefb36fb3e8e37d926c19b29b101abb Mon Sep 17 00:00:00 2001 From: dami Date: Sun, 5 Jul 2026 04:05:19 +0800 Subject: [PATCH] Update webstats_log.lua --- plugins/webstats/lua/webstats_log.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/webstats/lua/webstats_log.lua b/plugins/webstats/lua/webstats_log.lua index adc56e4ec..ef51c5938 100644 --- a/plugins/webstats/lua/webstats_log.lua +++ b/plugins/webstats/lua/webstats_log.lua @@ -233,8 +233,8 @@ local function run_app() request_stat_fields["status_" .. status_code] = 1 end - local lower_method = string.lower(method) - if http_methods[lower_method] then + local lower_method = method and string.lower(method) or "" + if lower_method ~= "" and http_methods[lower_method] then request_stat_fields["http_" .. lower_method] = 1 end