Changeset

13207:c563da1694bf

core.moduleapi: Log error for unexpected types (booleans?) set as periods
author Kim Alvefur <zash@zash.se>
date Sun, 16 Jul 2023 21:02:24 +0200
parents 13206:7435a9341bb3
children 13208:a7c6ea1c5308
files core/moduleapi.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/moduleapi.lua	Sun Jul 16 21:01:31 2023 +0200
+++ b/core/moduleapi.lua	Sun Jul 16 21:02:24 2023 +0200
@@ -272,6 +272,8 @@
 			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