]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Filter nil values in rspamd_config:get_all_opt
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Mar 2020 14:32:33 +0000 (14:32 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Mar 2020 14:32:33 +0000 (14:32 +0000)
src/lua/lua_config.c

index 8afe8fbfea5a1e2c9b145f788310474e2ac0d777..fe4167a5b15745b952d21a076c0e6c3b918a5973 100644 (file)
@@ -1035,7 +1035,7 @@ lua_config_get_all_opt (lua_State * L)
 
                                        while ((cur_elt = ucl_object_iterate_safe (it, true))) {
                                                lua_pushstring (L, ucl_object_key (cur_elt));
-                                               ucl_object_push_lua (L, cur_elt, true);
+                                               ucl_object_push_lua_filter_nil (L, cur_elt, true);
                                                lua_settable (L, -3);
                                        }
                                }
@@ -1050,7 +1050,7 @@ lua_config_get_all_opt (lua_State * L)
 
                                LL_FOREACH (obj, cur) {
                                        lua_pushinteger (L, i++);
-                                       ucl_object_push_lua (L, cur, true);
+                                       ucl_object_push_lua_filter_nil (L, cur, true);
                                        lua_settable (L, -3);
                                }