From: Vsevolod Stakhov Date: Thu, 25 Jan 2024 11:54:36 +0000 (+0000) Subject: [Minor] Add fail-safety X-Git-Tag: 3.8.1~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=04f6599ad750e8381626a6e92e05448ceab32732;p=rspamd.git [Minor] Add fail-safety --- diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua index edaae9443..818d955e9 100644 --- a/lualib/lua_redis.lua +++ b/lualib/lua_redis.lua @@ -1290,7 +1290,7 @@ local function add_redis_script(script, redis_params, caller_level, maybe_filena if not caller_level then caller_level = 2 end - local caller = debug.getinfo(caller_level) + local caller = debug.getinfo(caller_level) or debug.getinfo(caller_level - 1) or E local new_script = { caller = caller,