Fix minor bug in paste_post method
Make a variable that was global local when an error is thrown.
This commit is contained in:
parent
77d8c0e66b
commit
a0c8907f71
|
@ -51,7 +51,7 @@ local function anon_paste(req,ps)
|
||||||
util.sqlbind(stmnt_paste,"bind_blob",5,"")
|
util.sqlbind(stmnt_paste,"bind_blob",5,"")
|
||||||
util.sqlbind(stmnt_paste,"bind",6,ps.unlisted)
|
util.sqlbind(stmnt_paste,"bind",6,ps.unlisted)
|
||||||
util.sqlbind(stmnt_paste,"bind_blob",7,textsha3)
|
util.sqlbind(stmnt_paste,"bind_blob",7,textsha3)
|
||||||
err = util.do_sql(stmnt_paste)
|
local err = util.do_sql(stmnt_paste)
|
||||||
stmnt_paste:reset()
|
stmnt_paste:reset()
|
||||||
if err == sql.DONE then
|
if err == sql.DONE then
|
||||||
local rowid = stmnt_paste:last_insert_rowid()
|
local rowid = stmnt_paste:last_insert_rowid()
|
||||||
|
|
Loading…
Reference in New Issue