summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorDaniel Dickinson <cshoredaniel@users.noreply.github.com>2017-01-10 17:19:55 -0500
committerGitHub <noreply@github.com>2017-01-10 17:19:55 -0500
commit6c13339ad393fdbf5f6633ba2a41a7814baed9b6 (patch)
treea9ca2eceade34b8312f7a0d1b7686b0094e933c0 /modules
parent8703653eb8e11fdbb642e22b31f5f8e2dcbc3bad (diff)
parent7bfd36d5855100fe18a7759644aef697e9d03cee (diff)
Merge pull request #930 from cshore-firmware/pull-request-fix-webadmin
base: webadmin: Don't take substring of nil variable
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/luasrc/tools/webadmin.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/tools/webadmin.lua b/modules/luci-base/luasrc/tools/webadmin.lua
index 8273175de..106810aa0 100644
--- a/modules/luci-base/luasrc/tools/webadmin.lua
+++ b/modules/luci-base/luasrc/tools/webadmin.lua
@@ -96,7 +96,7 @@ function iface_get_network(iface)
if net.l3_device == iface or net.device == iface then
-- cross check with uci to filter out @name style aliases
local uciname = cur:get("network", net.interface, "ifname")
- if not uciname or uciname:sub(1, 1) ~= "@" then
+ if type(uciname) == "string" and uciname:sub(1,1) ~= "@" or uciname then
return net.interface
end
end