diff --git a/src/Query.php b/src/Query.php index 3debb9b6..ccf867a0 100644 --- a/src/Query.php +++ b/src/Query.php @@ -89,7 +89,7 @@ public static function build(array $params, $encoding = PHP_QUERY_RFC3986, bool throw new \InvalidArgumentException('Invalid type'); } - $castBool = $treatBooleansAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; }; + $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; }; $qs = ''; foreach ($params as $k => $v) {