Skip to content

Commit

Permalink
Fixed http_build_query() deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fastnloud authored and bart-van-amelsvoort committed Apr 15, 2022
1 parent 126fed0 commit f2673d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 4.1.1

* Changed PHP version constraint to >=7.4
* Fixed http_build_query() deprecation warning: Passing null to parameter #2 ($numeric_prefix) of type string is deprecated

## 4.0.1

Expand Down
2 changes: 1 addition & 1 deletion lib/FH/PostcodeAPI/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private function buildUrl(string $path): string

private function createHttpGetRequest(string $url, array $params = []): Request
{
$url .= (count($params) > 0 ? '?' . http_build_query($params, null, '&', PHP_QUERY_RFC3986) : '');
$url .= (count($params) > 0 ? '?' . http_build_query($params, '', '&', PHP_QUERY_RFC3986) : '');

return new Request('GET', $url);
}
Expand Down

0 comments on commit f2673d3

Please sign in to comment.