Skip to content
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

Fix: PHP Deprecated: json_encode(): Passing null to parameter #2 #3532

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

burhandodhy
Copy link
Contributor

Description of the Change

This PR fixes the issue where the CLI commands throw the warning PHP Deprecated: json_encode(): Passing null to parameter #2 in PHP 8.1. Since PHP 8.1, passing null` throws the deprecated warning.

Closes #

How to test the Change

  1. Bump the PHP version to 8.1
  2. Run wp elasticpress get-last-sync command

Changelog Entry

Fixed - Deprecated: json_encode(): Passing null to parameter #2

Credits

Props @burhandodhy

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@burhandodhy burhandodhy added this to the 4.6.1 milestone Jul 5, 2023
@felipeelia felipeelia merged commit cb47bb1 into develop Jul 5, 2023
7 of 8 checks passed
@felipeelia felipeelia deleted the fix/depreciated-warning-json_encode branch July 5, 2023 12:35
felipeelia added a commit that referenced this pull request Jul 5, 2023
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