From: Jo-Philipp Wich Date: Wed, 4 Jun 2008 23:40:40 +0000 (+0000) Subject: * luci/themes: do an explicit check for table data type on result of uci.changes() X-Git-Tag: 0.8.0~879 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=788cbb263325a9c0405ba22db6ea5a85ced70833;p=oweals%2Fluci.git * luci/themes: do an explicit check for table data type on result of uci.changes() --- diff --git a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm index a8ecff7f2..32d844f01 100644 --- a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm +++ b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm @@ -122,7 +122,7 @@ end require("luci.model.uci") local ucic = 0 local changes = luci.model.uci.changes() - if changes then + 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; diff --git a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm index ee784f24b..f18d0bce3 100644 --- a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm @@ -122,7 +122,7 @@ end require("luci.model.uci") local ucic = 0 local changes = luci.model.uci.changes() - if changes then + 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;