From 4ca4204e54a113546b1b0973d0433992db9db921 Mon Sep 17 00:00:00 2001 From: Ping-yee <611077101@mail.nknu.edu.tw> Date: Sat, 16 Nov 2024 00:22:21 +0800 Subject: [PATCH] fix: curl request crashes with params that give an int once hexed. (#9198) * fix: handle hex2bin() function input. * docs: add a comment out. --- system/HTTP/URI.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/HTTP/URI.php b/system/HTTP/URI.php index efa99cf778a8..d0d23a3d26ee 100644 --- a/system/HTTP/URI.php +++ b/system/HTTP/URI.php @@ -1177,7 +1177,8 @@ protected function parseStr(string $query): array parse_str($params, $result); foreach ($result as $key => $value) { - $return[hex2bin($key)] = $value; + // Array key might be int + $return[hex2bin((string) $key)] = $value; } return $return;