From c8ed05967a9b240afa011834601f1a82467c7917 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 16 Jul 2023 21:02:24 +0200 Subject: core.moduleapi: Log error for unexpected types (booleans?) set as periods --- core/moduleapi.lua | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3