]> source.dussan.org Git - rspamd.git/commitdiff
Fix load of settings with no setup.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Oct 2015 14:16:53 +0000 (14:16 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Oct 2015 14:16:53 +0000 (14:16 +0000)
src/plugins/lua/settings.lua

index 0003d0b64b3f5f7c61088edae5e9df843d08f407..e29b2d2726ee95030f0acbe78abc7ab5ea1cc25a 100644 (file)
@@ -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