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

Prevent fatal error in WP 5.8 and earlier. #277

Merged
merged 1 commit into from Feb 12, 2024
Merged

Conversation

peterwilsoncc
Copy link
Contributor

@peterwilsoncc peterwilsoncc commented Feb 12, 2024

Description of the Change

Resolves a fatal error in latest_episode_check on older versions of WP before the third parameter was added to the pre_render_block filter.

The parameter was unused so I've simply removed it as PHP will not throw if additional parameters are passed to a function.

There are no back-compat concerns for developers removing the hook as remove_filter() does not require the number of arguments be passed.

Closes #276.

Testing notes

  1. Install WordPress 5.8
  2. On board this plugin (set up a taxononmy)
  3. Create a post
  4. Insert a simple podcasting block and add media
  5. Save post

On trunk the post will not save, on this branch it will.

Alternate Designs

N/A

Possible Drawbacks

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Fixed - Fatal error in WordPress 5.8 and earlier.

Credits

Props @peterwilsoncc, @Sidsector9

@peterwilsoncc peterwilsoncc requested a review from a team as a code owner February 12, 2024 02:53
@peterwilsoncc peterwilsoncc requested review from iamdharmesh and removed request for a team February 12, 2024 02:53
@github-actions github-actions bot modified the milestone: 1.8.0 Feb 12, 2024
@github-actions github-actions bot added the needs:code-review This requires code review. label Feb 12, 2024
@jeffpaul jeffpaul merged commit 6a9175d into develop Feb 12, 2024
13 checks passed
@jeffpaul jeffpaul deleted the fix/276-fatal-error branch February 12, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal Error: Two few arguments passed to tenup_podcasting\block\latest_episode_check()
3 participants