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: response() returning ResponseFactory instead of Response #336

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

dsturm
Copy link
Sponsor Contributor

@dsturm dsturm commented Jan 30, 2024

This PR attempts to resolve issue #335, which involves an exception occurring in the new WordPress Routes support introduced in #334.

Previously, when response() was called without any parameters, it would return ResponseFactory::class because of a conditional check. However, to obtain the required Response::class, an empty string now needs to be passed.

Furthermore, this pull request includes a check to prevent errors with header_remove() by verifying if headers have already been sent.

Copy link
Sponsor Member

@retlehs retlehs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! ❤️

@retlehs retlehs merged commit 87e9d84 into roots:main Jan 30, 2024
2 checks passed
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.

None yet

2 participants