|
@@ -36,7 +36,7 @@ function M.getConfig()
|
|
|
local sql = string.format("select config from `db_filter_config` WHERE config_id = 1 ")
|
|
|
local res = mysqldbx.query(sql)
|
|
|
local obj = {}
|
|
|
- if res[1].config~=nil then
|
|
|
+ if #res>0 and res[1].config~=nil then
|
|
|
obj = cjson.decode(res[1].config)
|
|
|
else
|
|
|
obj = {
|