From b37440609e71c21b7b3f225dcaf021b53c7d078c Mon Sep 17 00:00:00 2001 From: Tarmo Oja Date: Fri, 23 Aug 2024 15:00:27 +0300 Subject: [PATCH] handle nil --- lualib/lua_util.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index 8f44e25f2..88599407c 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -1696,6 +1696,9 @@ exports.join_path = join_path -- ---]]] local function url_encode_string(str) + if str == nil then + return '' + end str = string.gsub(str, "([^%w _%%%-%.~])", function(c) return string.format("%%%02X", string.byte(c)) -- 2.39.5