diff options
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/luasrc/model/uci.lua | 2 | ||||
-rw-r--r-- | modules/luci-base/luasrc/model/uci.luadoc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/luci-base/luasrc/model/uci.lua b/modules/luci-base/luasrc/model/uci.lua index e9bac6ec03..577c6cde08 100644 --- a/modules/luci-base/luasrc/model/uci.lua +++ b/modules/luci-base/luasrc/model/uci.lua @@ -111,7 +111,7 @@ function Cursor.get_list(self, config, section, option) local val = self:get(config, section, option) return ( type(val) == "table" and val or { val } ) end - return nil + return {} end function Cursor.get_first(self, conf, stype, opt, def) diff --git a/modules/luci-base/luasrc/model/uci.luadoc b/modules/luci-base/luasrc/model/uci.luadoc index f3aa609d59..9e4a58f1d9 100644 --- a/modules/luci-base/luasrc/model/uci.luadoc +++ b/modules/luci-base/luasrc/model/uci.luadoc @@ -88,7 +88,8 @@ Get an option or list and return values as table. @param config UCI config @param section UCI section name @param option UCI option -@return UCI value +@return table. If the option was not found, you will simply get +-- an empty table. ]] ---[[ |