1 Handle empty json request result gracefully.
3 Signed-off-
by: Lars Kruse <devel@sumpfralle.de>
5 --- a/luci/applications/luci-olsr/luasrc/controller/olsr.lua
6 +++ b/luci/applications/luci-olsr/luasrc/controller/olsr.lua
7 @@ -414,9 +414,9 @@
function fetch_jsoninfo(otable)
11 - jsondata4 = json.decode(jsonreq4)
12 + jsondata4 = json.decode(jsonreq4) or {}
13 if otable ==
'status' then
14 - data4 = jsondata4 or {}
17 data4 = jsondata4[otable] or {}