From: Jo-Philipp Wich Date: Mon, 8 Jun 2009 20:40:18 +0000 (+0000) Subject: modules/admin-full: fix exception in interface status page for devices with an empty... X-Git-Tag: 0.9.0~225 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=30a15ca081bd84df1c6ac8e4edb500860ff85e86;p=oweals%2Fluci.git modules/admin-full: fix exception in interface status page for devices with an empty ifname for wan (#71) --- diff --git a/modules/admin-full/luasrc/view/admin_status/interfaces.htm b/modules/admin-full/luasrc/view/admin_status/interfaces.htm index 482aa0c0c..5358caeae 100644 --- a/modules/admin-full/luasrc/view/admin_status/interfaces.htm +++ b/modules/admin-full/luasrc/view/admin_status/interfaces.htm @@ -63,7 +63,7 @@ $Id$ end function get_vlan(i) - return i:match("^%w+%.(%d+)$") + return i and i:match("^%w+%.(%d+)$") end function get_vlan_ports(i) @@ -178,7 +178,7 @@ $Id$ dev = get_ifname(i) vlan = get_vlan(dev) - if devinfo and devinfo[dev] then + if dev and devinfo and devinfo[dev] then %>

<%:a_s_if_interface Interface%> <%=i['.name']%>