Skip to content

Fix deprecation notices in PHP 8.1#220

Merged
danielbachhuber merged 2 commits intomainfrom
fix/php-8-1-deprecated-notices
Jan 10, 2023
Merged

Fix deprecation notices in PHP 8.1#220
danielbachhuber merged 2 commits intomainfrom
fix/php-8-1-deprecated-notices

Conversation

@danielbachhuber
Copy link
Member

@danielbachhuber danielbachhuber commented Dec 21, 2022

wp core version produces:

Deprecated: file_get_contents(): Passing null to parameter #2 ($use_include_path) of type bool is deprecated in /Users/danielbachhuber/projects/wp-cli-dev/core-command/src/Core_Command.php on line 929

wp core download --force produces:

Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /Users/danielbachhuber/projects/wp-cli-dev/core-command/src/Core_Command.php on line 991

Fixes #219

@danielbachhuber danielbachhuber added bug command:core Related to 'core' command labels Dec 21, 2022
@danielbachhuber danielbachhuber added this to the 2.1.8 milestone Dec 21, 2022
@danielbachhuber danielbachhuber self-assigned this Dec 21, 2022
@danielbachhuber danielbachhuber requested a review from a team as a code owner December 21, 2022 18:59
@wojtekn
Copy link

wojtekn commented Jan 2, 2023

@danielbachhuber it fixes those notices for me.

The wp core download --force command was still throwing a similar notice in another place for me. I fixed it in
another PR wp-cli/wp-cli#5717

The remaining notices are caused by 3rd party library and are tracked under wp-cli/wp-cli#5623

@danielbachhuber danielbachhuber merged commit 2c79f63 into main Jan 10, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix/php-8-1-deprecated-notices branch January 10, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:core Related to 'core' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecated warning on PHP 8.1 running wp core version

2 participants