1 Handle empty json request result gracefully.
3 Signed-off-by: Lars Kruse <devel@sumpfralle.de>
5 --- a/luci/applications/luci-app-olsr/luasrc/controller/olsr.lua
6 +++ b/luci/applications/luci-app-olsr/luasrc/controller/olsr.lua
7 @@ -390,9 +390,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 {}