|
登录界面出现了如下信息/usr/lib/lua/luci/dispatcher.lua:609: bad argument #1 to 'pairs' (table expected, got nil)stack traceback: [C]: in function 'pairs' /usr/lib/lua/luci/dispatcher.lua:609: in function 'createtree' /usr/lib/lua/luci/dispatcher.lua:261: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:127: in function </usr/lib/lua/luci/dispatcher.lua:126>登录不了路由器了。
请问要怎么该dispatch.lua文件才可以?
local stat, err = util.coxpcall(function()
dispatch(context.request) #127
end, error500)
http.close()
--context._disable_memtrace()
end
local c = ctx.tree
local stat
if not c then
c = createtree() #261
end
function createtree()
if not index then
createindex()
end
local ctx = context
local tree = {nodes={}, inreq=true}
local modi = {}
ctx.treecache = setmetatable({}, {__mode="v"})
ctx.tree = tree
ctx.modifiers = modi
-- Load default translation
require "luci.i18n".loadc("base")
local scope = setmetatable({}, {__index = luci.dispatcher})
for k, v in pairs(index) do #609
scope._NAME = k
setfenv(v, scope)
v()
end
请大神指点迷津。
|
|