summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-03-29 22:13:26 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-03-29 22:13:26 +0000
commit0c7effc0c0c4248d0fd96b6fb289139c388a9fb7 (patch)
tree8584ee97b3ff3ba9b5fc4fde834a2df62844d061
parent2c7a76105403ede3bf4a9803a47ca62d86e8cd72 (diff)
libs/cbi: properly handle uvl errors without childs
-rw-r--r--libs/cbi/luasrc/cbi.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index 4bed9b0e68..e7ad55047f 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -166,7 +166,7 @@ local function _uvl_validate_section(node, name)
local function tag_section(e)
local s = { }
- for _, c in ipairs(e.childs) do
+ for _, c in ipairs(e.childs or { e }) do
if c.childs and not c:is(luci.uvl.errors.ERR_DEPENDENCY) then
table.insert( s, c.childs[1]:string() )
else