From afe05cfd872e213a6781eccadbdfaa811807cd49 Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 30 Jun 2026 22:31:36 +0200 Subject: [PATCH] fixed parsing BOOLEAN parameter --- src/APIlite.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/APIlite.php b/src/APIlite.php index b6f320e..928ddf9 100644 --- a/src/APIlite.php +++ b/src/APIlite.php @@ -396,7 +396,12 @@ class APIlite $param_value = (string) $param_value; break; case 'bool': - $param_value = (bool) $param_value; + if (is_string($param_value)) { + $param_value = strtolower($param_value); + $param_value = in_array($param_value, ['1', 'true', 'on', 'yes']); + } else { + $param_value = (bool) $param_value; + } break; case 'array': $param_value = json_decode($param_value, true);