Skip to content

Fix undefined constant error in WP handler#589

Merged
pfefferle merged 1 commit intomainfrom
fix/missing-dollar-sign-response
Mar 11, 2026
Merged

Fix undefined constant error in WP handler#589
pfefferle merged 1 commit intomainfrom
fix/missing-dollar-sign-response

Conversation

@pfefferle
Copy link
Copy Markdown
Owner

Summary

  • Fix missing $ prefix on response variable in includes/handler/class-wp.php:73, which caused a PHP fatal error (Undefined constant "Webmention\Handler\response")

Fixes #587

Missing $ prefix on return variable caused PHP to interpret
`response` as a constant, triggering a fatal error.

Fixes #587
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an error-handling bug in the WordPress API webmention handler so that WP_Error responses are correctly returned to the caller.

Changes:

  • Correctly returns the $response variable (instead of an undefined response) when Request::get() returns a WP_Error.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@pfefferle pfefferle merged commit cf8bd2e into main Mar 11, 2026
13 checks passed
@pfefferle pfefferle deleted the fix/missing-dollar-sign-response branch March 11, 2026 20:25
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.

Uncaught Error: Undefined constant "Webmention\Handler\response"

2 participants