webmcp

changeset 276:bac6cbdeb055

Bugfix in request.redirect{...}: allow params to be nil
author jbe
date Sat Mar 21 16:38:50 2015 +0100 (2015-03-21)
parents ee7fcdade91d
children 2ddbb44680f7
files framework/env/request/redirect.lua
line diff
     1.1 --- a/framework/env/request/redirect.lua	Sat Mar 21 15:21:03 2015 +0100
     1.2 +++ b/framework/env/request/redirect.lua	Sat Mar 21 16:38:50 2015 +0100
     1.3 @@ -24,10 +24,10 @@
     1.4      if type(args.view) ~= "string" then
     1.5        error("No view string passed to request.redirect{...}.")
     1.6      end
     1.7 -    if type(args.params) ~= "table" then
     1.8 +    if args.params ~= nil and type(args.params) ~= "table" then
     1.9        error("Params array passed to request.redirect{...} is not a table.")
    1.10      end
    1.11 -    if args.anchor and type(args.anchor) ~= "string" then
    1.12 +    if args.anchor ~= nil and type(args.anchor) ~= "string" then
    1.13        error("Anchor passed to request.redirect{...} must be a string or nil.")
    1.14      end
    1.15    end

Impressum / About Us