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

Check_Changes_Handler_Test: fix bug #201

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Sep 29, 2021

Context

  • Bug fix in test

Summary

This PR can be summarized in the following changelog entry:

  • Bug fix in test

Relevant technical choices:

This bug was exposed by PHP 8.1.

The Check_Changes_Handler::check_changes_action_handler() expects a global $wp_version variable to be available, but this variable was not created for the test, leading to a "Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated" deprecation notices in PHP 8.1.

Fixed by improving the test.

Note: the value now chosen, maintains the existing behaviour of this test as null would have been regarded as "less than 5.7".
See: https://3v4l.org/Upb1h

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • N/A If the build passes, we're good.

This bug was exposed by PHP 8.1.

The `Check_Changes_Handler::check_changes_action_handler()` expects a global `$wp_version` variable to be available, but this variable was not created for the test, leading to a "Deprecated: version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated" deprecation notices in PHP 8.1.

Fixed by improving the test.
@jrfnl jrfnl added this to the 4.2 milestone Sep 29, 2021
@jrfnl jrfnl requested a review from increddibelly October 12, 2021 12:30
@jrfnl jrfnl removed this from the 4.2 milestone Oct 19, 2021
@enricobattocchi enricobattocchi self-assigned this Oct 28, 2021
@enricobattocchi enricobattocchi added this to the 4.2 milestone Oct 28, 2021
@enricobattocchi
Copy link
Member

Everything's clear and OK, merging!

@enricobattocchi enricobattocchi merged commit 7caaeba into trunk Oct 28, 2021
@enricobattocchi enricobattocchi deleted the JRF/QA/php-8.1-fix-bug-in-test branch October 28, 2021 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants