Skip to content

Fix deprecation notice triggered in WpOrgApi class in PHP 8.1 - #5717

Merged
danielbachhuber merged 1 commit into
wp-cli:mainfrom
wojtekn:fix/php-8.1-deprecation-notice
Jan 2, 2023
Merged

Fix deprecation notice triggered in WpOrgApi class in PHP 8.1#5717
danielbachhuber merged 1 commit into
wp-cli:mainfrom
wojtekn:fix/php-8.1-deprecation-notice

Conversation

@wojtekn

@wojtekn wojtekn commented Jan 2, 2023

Copy link
Copy Markdown
Contributor

Currently, the wp core download command returns a deprecated notice triggered by WpOrgApi class:

$ bin/wp core download --force
PHP Deprecated:  http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /Volumes/Sites/wp-cli/php/WP_CLI/WpOrgApi.php on line 135

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /Volumes/Sites/wp-cli/php/WP_CLI/WpOrgApi.php on line 135

In this PR, I propose to fix the notice.

@danielbachhuber danielbachhuber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @wojtekn !

@danielbachhuber danielbachhuber added this to the 2.8.0 milestone Jan 2, 2023
@danielbachhuber
danielbachhuber merged commit 0c7b531 into wp-cli:main Jan 2, 2023
@wojtekn
wojtekn deleted the fix/php-8.1-deprecation-notice branch January 2, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants