aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/settings.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-26 14:16:53 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-26 14:16:53 +0000
commit1008f30aa87b791bbe8cefd02372dd7e767f13c4 (patch)
tree70cade68e8695452953fde00ed3d92781b9c05cb /src/plugins/lua/settings.lua
parent0ae2f7f92758d468a24f05dfe95ffaa97ed4513c (diff)
downloadrspamd-1008f30aa87b791bbe8cefd02372dd7e767f13c4.tar.gz
rspamd-1008f30aa87b791bbe8cefd02372dd7e767f13c4.zip
Fix load of settings with no setup.
Diffstat (limited to 'src/plugins/lua/settings.lua')
-rw-r--r--src/plugins/lua/settings.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua
index 0003d0b64..e29b2d272 100644
--- a/src/plugins/lua/settings.lua
+++ b/src/plugins/lua/settings.lua
@@ -473,12 +473,12 @@ local function process_settings_map(string)
return res
end
-if set_section[1] and type(set_section[1]) == "string" then
+if set_section and set_section[1] and type(set_section[1]) == "string" then
-- Just a map of ucl
if not rspamd_config:add_map(set_section[1], "settings map", process_settings_map) then
rspamd_logger.errx(rspamd_config, 'cannot load settings from %1', set_section)
end
-elseif type(set_section) == "table" then
+elseif set_section and type(set_section) == "table" then
process_settings_table(set_section)
end