aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-16 18:09:53 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-16 18:09:53 +0100
commitd9942f8612540643141087a20ef2875becbe4c3d (patch)
tree04e9f4df8135f24f1e689bd61c321c84c8f3a04d /src/plugins
parent6576616d3fe319148a29dc6d0ef0222b24384fd0 (diff)
downloadrspamd-d9942f8612540643141087a20ef2875becbe4c3d.tar.gz
rspamd-d9942f8612540643141087a20ef2875becbe4c3d.zip
[Minor] Fix some warnings
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/fann_redis.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua
index f7ec65d30..e2a7eb4f5 100644
--- a/src/plugins/lua/fann_redis.lua
+++ b/src/plugins/lua/fann_redis.lua
@@ -367,7 +367,7 @@ local function fann_scores_filter(task)
id = id .. r
end
- if fanns[id].fann then
+ if fanns[id] and fanns[id].fann then
local fann_data = task:get_symbols_tokens()
local mt = meta_functions.rspamd_gen_metatokens(task)
-- Add filtered meta tokens
@@ -1093,13 +1093,13 @@ else
local function override_defaults(def, override)
for k,v in pairs(override) do
if def[k] then
- if type(override[k]) == 'table' then
- override_defaults(def[k], override[k])
+ if type(v) == 'table' then
+ override_defaults(def[k], v)
else
- def[k] = override[k]
+ def[k] = v
end
else
- def[k] = override[k]
+ def[k] = v
end
end
end