diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-16 21:02:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-16 21:02:24 +0200 |
commit | c8ed05967a9b240afa011834601f1a82467c7917 (patch) | |
tree | 04afcf02bb4c2fd37511dec9b942026e89470212 /core | |
parent | f3aac1a4be9ba4219942a8314868c4634e1b090c (diff) | |
download | prosody-c8ed05967a9b240afa011834601f1a82467c7917.tar.gz prosody-c8ed05967a9b240afa011834601f1a82467c7917.zip |
core.moduleapi: Log error for unexpected types (booleans?) set as periods
Diffstat (limited to 'core')
-rw-r--r-- | core/moduleapi.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 8fa1b672..2b3e36c1 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -272,6 +272,8 @@ function api:get_option_period(name, default_value) self:log("error", "Config option '%s' not understood, expecting a period (e.g. \"2 days\")", name); end return ret; + elseif value ~= nil then + self:log("error", "Config option '%s' expects a number or a period description string (e.g. \"3 hours\"), not %s", name, type(value)); end end |