prosodyctl check: Fix traceback if the global modules_enabled is unset
authorKim Alvefur <zash@zash.se>
Tue, 12 Jan 2016 00:13:57 +0000 (01:13 +0100)
committerKim Alvefur <zash@zash.se>
Tue, 12 Jan 2016 00:13:57 +0000 (01:13 +0100)
prosodyctl

index 0c80aca7bababafe49a6788ad4686c3ab6c4e438..e08c9dd2ead620f4a64b861ddcb9c371b3d2f32d 100755 (executable)
@@ -1080,8 +1080,8 @@ function commands.check(arg)
                                target_hosts:remove("localhost");
                        end
                        
-                       local modules = set.new(it.to_array(it.values(host_options.modules_enabled)))
-                                       + set.new(it.to_array(it.values(config.get("*", "modules_enabled"))))
+                       local modules = set.new(it.to_array(it.values(host_options.modules_enabled or {})))
+                                       + set.new(it.to_array(it.values(config.get("*", "modules_enabled") or {})))
                                        + set.new({ config.get(host, "component_module") });
 
                        if modules:contains("proxy65") then