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
['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