diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-11-08 15:09:11 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-11-08 15:09:11 +0000 |
commit | 581c6ab9d1d9a20fd410548410f5b4e82d12346c (patch) | |
tree | 810a2e4be010f4666a4739cc306a1db3e970ff9f /core | |
parent | cf460170b5bbdbf2c952257eb01de94a336cda40 (diff) | |
download | prosody-581c6ab9d1d9a20fd410548410f5b4e82d12346c.tar.gz prosody-581c6ab9d1d9a20fd410548410f5b4e82d12346c.zip |
modulemanager: api:get_option(): Handle correctly option values of boolean false, don't assume value unset
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 88d07f43..9cd56187 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -390,7 +390,14 @@ function api:require(lib) end function api:get_option(name, default_value) - return config.get(self.host, self.name, name) or config.get(self.host, "core", name) or default_value; + local value = config.get(self.host, self.name, name); + if value == nil then + value = config.get(self.host, "core", name); + if value == nil then + value = default_value; + end + end + return value; end local t_remove = _G.table.remove; |