pass code static-check
This commit is contained in:
parent
ad57c76b73
commit
7de718f359
1 changed files with 3 additions and 2 deletions
|
@ -55,7 +55,7 @@ local function parse_cookie_expires(expires)
|
|||
elseif unit == "s" then
|
||||
return time
|
||||
else
|
||||
return nil, string.format("the unit of expires (%s) is wrong, validated unit includes: y, M, w, d, h, m and s", expires)
|
||||
return nil, string.format("the unit of expires (%s) is wrong", expires)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -73,8 +73,9 @@ local function set_cookie(self, value)
|
|||
httponly = true,
|
||||
}
|
||||
|
||||
local expires
|
||||
if self.cookie_expires then
|
||||
local expires, err = parse_cookie_expires(self.cookie_expires)
|
||||
expires, err = parse_cookie_expires(self.cookie_expires)
|
||||
if err then
|
||||
ngx.log(ngx.WARN, string.format("error when parsing cookie expires: %s, ignoring it", tostring(err)))
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue