From c7e3e118116ed8065cdff0e4192a489c955fee32 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 8 Jun 2008 21:21:33 +0000 Subject: [PATCH] * libs/cbi: Fixed a bug which prevented creation of non-anonymous sections --- libs/cbi/luasrc/cbi.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index fbd235595f..2e788be5f9 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -173,7 +173,11 @@ end -- UCI set function Map.set(self, section, option, value) - return uci.set(self.config, section, option or value, option and value) + if option then + return uci.set(self.config, section, option, value) + else + return uci.set(self.config, section, value) + end end -- UCI del -- 2.30.2