* luci/themes: do an explicit check for table data type on result of uci.changes()
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 4 Jun 2008 23:40:40 +0000 (23:40 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 4 Jun 2008 23:40:40 +0000 (23:40 +0000)
themes/fledermaus/luasrc/view/themes/fledermaus/header.htm
themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm

index a8ecff7f2f1c7b58b8c5749b56c7fd5192cfccc1..32d844f016c69dd79e8cbb17581bf2bc6d5a351e 100644 (file)
@@ -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;
index ee784f24b31db309a8d253f3cbf81a3b738dc397..f18d0bce3944fae5649ccf22f3f98c0721ba7133 100644 (file)
@@ -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;