Permalink
Browse files

fixed a bug for expiry and services without one

  • Loading branch information...
1 parent 2db7000 commit bb8f0e0e72d609ddfe5ec031e447f8c046397105 kiwi committed Aug 4, 2009
Showing with 14 additions and 12 deletions.
  1. +14 −12 curlpaste
View
@@ -622,22 +622,24 @@ if not LP.cont then
end
local function checkExpiry(tbl)
- if not (function()
- for k, v in pairs(tbl.services[tbl.service].expires) do
- if type(k) == "number" then
- if v:lower() == tbl.expires:lower() then
- tbl.expires = v
+ if next(tbl.services[tbl.service].expires) then
+ if not (function()
+ for k, v in pairs(tbl.services[tbl.service].expires) do
+ if type(k) == "number" then
+ if v:lower() == tbl.expires:lower() then
+ tbl.expires = v
+ return true
+ end
+ elseif k:lower() == tbl.expires:lower() then
+ tbl.expires = k
return true
end
- elseif k:lower() == tbl.expires:lower() then
- tbl.expires = k
- return true
end
+ end)()
+ then
+ tbl.cont = false
+ print("Invalid expiration.")
end
- end)()
- then
- tbl.cont = false
- print("Invalid expiration.")
end
end

0 comments on commit bb8f0e0

Please sign in to comment.