From a0c8907f7174839d473c539064ed08f97114c4ab Mon Sep 17 00:00:00 2001 From: Robin Malley Date: Sun, 26 Jun 2022 22:52:58 +0000 Subject: [PATCH] Fix minor bug in paste_post method Make a variable that was global local when an error is thrown. --- src/lua/endpoints/paste_post.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/endpoints/paste_post.lua b/src/lua/endpoints/paste_post.lua index c6781a3..b51b7a5 100644 --- a/src/lua/endpoints/paste_post.lua +++ b/src/lua/endpoints/paste_post.lua @@ -51,7 +51,7 @@ local function anon_paste(req,ps) util.sqlbind(stmnt_paste,"bind_blob",5,"") util.sqlbind(stmnt_paste,"bind",6,ps.unlisted) util.sqlbind(stmnt_paste,"bind_blob",7,textsha3) - err = util.do_sql(stmnt_paste) + local err = util.do_sql(stmnt_paste) stmnt_paste:reset() if err == sql.DONE then local rowid = stmnt_paste:last_insert_rowid()