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 warning about deprecated ability #2334

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

Camwyn
Copy link
Member

@Camwyn Camwyn commented Dec 30, 2024

see #2333

🎫 Ticket

TEC-5086

🗒️ Description

As explained by one of our users here, our Tribe__PUE__Checker::get_installed_version() function was returning null because it was looking for event-aggregator/event-aggregator.php. EA is not standalone plugin, it comes bundled with TEC. Passing null to version_compare() in PHP >8.1 caused this warning:

Deprecated: version_compare(): Passing null to parameter #2 ($version2) of type string is deprecated in ..\the-events-calendar\common\src\Tribe\PUE\Checker.php on line 1710

The fix is to pass an empty string in this case.

🎥 Artifacts

Screenshot_1

✔️ Checklist

  • Ran npm run changelog to add changelog file(s). More info here
  • Code is covered by NEW wpunit or integration tests.
  • Code is covered by EXISTING wpunit or integration tests.
  • Are all the required tests passing?
  • Automated code review comments are addressed.
  • Have you added Artifacts?
  • Check the base branch for your PR.
  • Add your PR to the project board for the release.

@Camwyn Camwyn mentioned this pull request Dec 30, 2024
8 tasks
@Camwyn Camwyn added the code review Status: requires a code review. label Dec 30, 2024
@Camwyn Camwyn changed the title Fix deprecated warning Fix warning about deprecated ability Dec 30, 2024
codingmusician
codingmusician previously approved these changes Jan 2, 2025
@codingmusician
Copy link
Contributor

Code is approved, although there are tests failing...

@pattihis pattihis merged commit f9fb8e5 into release/T25.imp Jan 8, 2025
17 of 18 checks passed
@pattihis pattihis deleted the fix/TEC-5086_deprecated_notice branch January 8, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code review Status: requires a code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants