* luci/libs/uvl: allow empty strings or undefined options as booleans too
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Sep 2008 16:28:19 +0000 (16:28 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Sep 2008 16:28:19 +0000 (16:28 +0000)
libs/uvl/luasrc/uvl/datatypes.lua

index 971bb9d..fc37fa3 100644 (file)
@@ -29,6 +29,8 @@ function boolean( val )
                return true
        elseif val == "0" or val == "no" or val == "off" or val == "false" then
                return true
+       elseif val == "" or val == nil then
+               return true
        end
 
        return false