From: Jo-Philipp Wich Date: Tue, 9 Sep 2008 16:28:19 +0000 (+0000) Subject: * luci/libs/uvl: allow empty strings or undefined options as booleans too X-Git-Tag: 0.9.0~1359 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=77432eb0479ec101aaa2287394ec8751d589aed2 * luci/libs/uvl: allow empty strings or undefined options as booleans too --- diff --git a/libs/uvl/luasrc/uvl/datatypes.lua b/libs/uvl/luasrc/uvl/datatypes.lua index 971bb9d75..fc37fa3c6 100644 --- a/libs/uvl/luasrc/uvl/datatypes.lua +++ b/libs/uvl/luasrc/uvl/datatypes.lua @@ -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