require("luci.model.uci")
local ucic = 0
local changes = luci.model.uci.changes()
- for n, s in pairs(changes) do
- for no, o in pairs(s) do
- ucic = ucic + 1;
+ if type(changes) == "table" then -- XXX: sometimes string or nil / needs investigation
+ for n, s in pairs(changes) do
+ for no, o in pairs(s) do
+ ucic = ucic + 1;
+ end
end
end
%>