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

Bug: Fixed content replacment to allow null values #2038

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

colinmurphy
Copy link
Contributor

@colinmurphy colinmurphy commented Feb 7, 2025

Fixes #2037

Tasks

  • I have signed a Contributor License Agreement (CLA) with WP Engine.
  • If a code change, I have written testing instructions that the whole team & outside contributors can understand.
  • I have written and included a comprehensive changeset to properly document the changes I've made.

Description

Issue since 1.6.0 where by if you pass a null value for content_replacement it will throw a 500 error.

In 1.6.0 we changed the method signature for content_replacement from content_replacement($content) to content_replacement( string $content) which caused issues for anyone passing a null value for content replacement in Faust WP.

Related Issue(s):

#2037

Testing

Tested locally with both single and multisite.

Screenshots

Testing content replacement on multisite.

image

Documentation Changes

N/A

Dependant PRs

N/A

…null values. Added unit tests and added a try and catch aswell to catch any future issues.
Copy link

changeset-bot bot commented Feb 7, 2025

🦋 Changeset detected

Latest commit: b4b6960

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@faustwp/wordpress-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 7, 2025

📦 Next.js Bundle Analysis for @faustwp/getting-started-example

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@colinmurphy colinmurphy marked this pull request as ready for review February 7, 2025 10:35
@colinmurphy colinmurphy requested a review from a team as a code owner February 7, 2025 10:35
@colinmurphy colinmurphy changed the title Bug: Fixed content replacment null value Bug: Fixed content replacment to allow null values Feb 7, 2025
@colinmurphy colinmurphy requested a review from theodesp February 7, 2025 12:36
@colinmurphy colinmurphy merged commit 4dddd20 into canary Feb 7, 2025
17 checks passed
@colinmurphy colinmurphy deleted the bug-content-replacement-null-values branch February 7, 2025 15:41
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.

Content Replacment null values
2 participants