From 5ef9396dfd9c308f74fc67e4799c92c1bf9ea5c3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 12 Feb 2026 17:35:32 +0000 Subject: [PATCH] [Fix] Handle native boolean values in lua_util.toboolean() toboolean() only handled string and number inputs, falling through to the error branch for native Lua booleans and always returning false. This broke the fuzzy_check "checks" configuration block since UCL converts boolean values to native Lua booleans, and apply_checks_overrides in lua_fuzzy.lua passes them through toboolean() via bool_opt(). Fixes: #5775 --- lualib/lua_util.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index dfc9ff0334..bc63861c42 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -1750,7 +1750,9 @@ exports.toboolean = function(v) ['False'] = false, }; - if type(v) == 'string' then + if type(v) == 'boolean' then + return v + elseif type(v) == 'string' then if true_t[v] == true then return true; elseif false_t[v] == false then -- 2.47.3