From 788cbb263325a9c0405ba22db6ea5a85ced70833 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 4 Jun 2008 23:40:40 +0000 Subject: [PATCH] * luci/themes: do an explicit check for table data type on result of uci.changes() --- themes/fledermaus/luasrc/view/themes/fledermaus/header.htm | 2 +- themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.25.1