summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-01-17 19:04:02 +0100
committerJo-Philipp Wich <jow@openwrt.org>2016-01-17 19:04:02 +0100
commit718466ea762d2fa166c6f32a80e915086216be84 (patch)
treee3d8cb7c22b8b930a668b4d93f389d7219ee12e8 /modules/luci-mod-admin-full
parentb3c69b123a698e596a5df4797378d976718247f0 (diff)
luci-mod-admin-full: prevent crash if channel of sta is unknown (#624)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full')
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
index 20edd68fe..824c920d3 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@ -156,8 +156,8 @@ end
if found_sta then
ch = s:taboption("general", DummyValue, "choice", translate("Channel"))
- ch.value = translatef("Locked to channel %d used by: %s",
- found_sta.channel, table.concat(found_sta.names, ", "))
+ ch.value = translatef("Locked to channel %s used by: %s",
+ found_sta.channel or "(auto)", table.concat(found_sta.names, ", "))
else
ch = s:taboption("general", Value, "_mode_freq", '<br />'..translate("Operating frequency"))
ch.hwmodes = hw_modes