From: Vsevolod Stakhov Date: Sun, 7 Jul 2019 11:02:55 +0000 (+0100) Subject: [Minor] Do not return raw tables as they might be uninitialized X-Git-Tag: 2.0~641 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3bcd7d1b7fcccb3de4a3857dfd3d70229b81eca;p=thirdparty%2Frspamd.git [Minor] Do not return raw tables as they might be uninitialized --- diff --git a/lualib/lua_settings.lua b/lualib/lua_settings.lua index fb1a70217e..67a33bb585 100644 --- a/lualib/lua_settings.lua +++ b/lualib/lua_settings.lua @@ -211,9 +211,24 @@ end exports.settings_by_id = settings_by_id -exports.all_settings = known_ids -exports.all_symbols = all_symbols +exports.all_settings = function() + if not post_init_performed then + register_settings_cb() + end + return known_ids +end +exports.all_symbols = function() + if not post_init_performed then + register_settings_cb() + end + return all_symbols +end -- What is enabled when no settings are there -exports.default_symbols = default_symbols +exports.default_symbols = function() + if not post_init_performed then + register_settings_cb() + end + return default_symbols +end return exports \ No newline at end of file