Skip to content

Pass '' instead of null to http_build_query()'s second parameter #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2022
Merged

Pass '' instead of null to http_build_query()'s second parameter #57

merged 1 commit into from
Mar 7, 2022

Conversation

TimWolla
Copy link
Contributor

@TimWolla TimWolla commented Mar 3, 2022

Passing null will show a deprecation warning with PHP 8.1.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets n/a
Documentation n/a
License MIT

What's in this PR?

This fixes a deprecation warning in PHP 8.1

Why?

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /pwd/vendor/php-http/client-integration-tests/src/HttpBaseTest.php on line 195

Example Usage

n/a

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

To Do

n/a

Passing `null` will show a deprecation warning with PHP 8.1.
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the CI seems to have a problem, but its not related to this.

the change seems sane to me, thanks

@dbu dbu merged commit 4dbbacf into php-http:master Mar 7, 2022
@TimWolla TimWolla deleted the patch-1 branch March 7, 2022 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants