diff --git a/CHANGELOG.md b/CHANGELOG.md index 93149158..0e0ab6dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Cast `$_SERVER['SERVER_PORT']` to integer to prevent adding 80 or 443 port to redirect URL. #403 - Check subject when verifying JWT #406 +### Fixed +- Changed parameter #2 of http_build_query to empty string on requestTokenExchange to support PHP8.x + ## [1.0.0] - 2023-12-13 ### Added diff --git a/src/OpenIDConnectClient.php b/src/OpenIDConnectClient.php index abb37d8e..fcb66996 100644 --- a/src/OpenIDConnectClient.php +++ b/src/OpenIDConnectClient.php @@ -972,7 +972,7 @@ public function requestTokenExchange(string $subjectToken, string $subjectTokenT } // Convert token params to string format - $post_params = http_build_query($post_data, null, '&', $this->encType); + $post_params = http_build_query($post_data, '', '&', $this->encType); return json_decode($this->fetchURL($token_endpoint, $post_params, $headers), false); }