projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7ab20f
)
libs/uci: fix attempt to assign empty tables in uci bind class
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 15 Oct 2009 16:22:03 +0000
(16:22 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 15 Oct 2009 16:22:03 +0000
(16:22 +0000)
libs/uci/luasrc/model/uci/bind.lua
patch
|
blob
|
history
diff --git
a/libs/uci/luasrc/model/uci/bind.lua
b/libs/uci/luasrc/model/uci/bind.lua
index 89ad3284c8ce55d309e058e30d4145f1b60e837a..6f9060d22402d282dde49fcf5783a1307dac66c5 100644
(file)
--- a/
libs/uci/luasrc/model/uci/bind.lua
+++ b/
libs/uci/luasrc/model/uci/bind.lua
@@
-126,7
+126,11
@@
end
function bsection.set(self, k, v, c)
local stat
if type(c) == "string" then
- stat = self:uciop("set", c, k, v)
+ if type(v) == "table" and #v == 0 then
+ stat = self:uciop("delete", c, k)
+ else
+ stat = self:uciop("set", c, k, v)
+ end
else
self:uciop("foreach", self.stype,
function(s)