luci/modules/luci-mod-admin-full/luasrc/view/admin_status
Brian J. Murrell 2c2e7f5cbb
Fix bad argument #1 to 'tonumber'
Fixes [FS#1118](https://bugs.lede-project.org/index.php?do=details&task_id=1118)

Luci chokes on devices that do not have _iptables_ installed with:

/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute function dispatcher target for entry '/'.
The called action terminated with an exception:
/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute firstchild dispatcher target for entry '/admin'.
The called action terminated with an exception:
/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute function dispatcher target for entry '/admin/status'.
The called action terminated with an exception:
/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute template dispatcher target for entry '/admin/status/overview'.
The called action terminated with an exception:
/usr/lib/lua/luci/template.lua:97: Failed to execute template 'admin_status/index'.
A runtime error occured: [string "/usr/lib/lua/luci/view/admin_status/index.h..."]:34: bad argument #1 to 'tonumber' (string expected, got nil)
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:460: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140>

The code should be more defensive.
2017-12-04 08:44:00 -05:00
..
bandwidth.htm luci-mod-admin-full: fix device selection in wireless and bandwidth realtime stats 2016-01-20 13:45:27 +01:00
connections.htm luci: ignore '::1' in realtime connections 2017-02-10 21:38:25 -05:00
dmesg.htm add fontsize style parameter 2017-09-13 19:49:40 +02:00
index.htm Fix bad argument #1 to 'tonumber' 2017-12-04 08:44:00 -05:00
iptables.htm Add support for showing ipv6 NAT table in Luci 2016-03-16 15:50:00 +02:00
load.htm Globally convert headline anchors into name attributes. 2015-10-06 13:30:33 +02:00
routes.htm Globally convert headline anchors into name attributes. 2015-10-06 13:30:33 +02:00
syslog.htm add fontsize style parameter 2017-09-13 19:47:47 +02:00
wireless.htm luci-mod-admin-full: fix device selection in wireless and bandwidth realtime stats 2016-01-20 13:45:27 +01:00