Skip to content

Fix fatal error in REST API on WP 7.0#311

Merged
pfefferle merged 1 commit into
trunkfrom
fix/rel-me-fatal-wp7
Mar 21, 2026
Merged

Fix fatal error in REST API on WP 7.0#311
pfefferle merged 1 commit into
trunkfrom
fix/rel-me-fatal-wp7

Conversation

@pfefferle

Copy link
Copy Markdown
Member

Summary

  • Fix array_values() fatal error when get_rel_me() returns false in the me REST field callback
  • Returns an empty array instead of passing false to array_values()

Closes #310

Test plan

  • Request /wp/v2/users/<id> for a user with no rel-me links configured
  • Verify no fatal error on WP 7.0-beta5

@dshanske dshanske self-requested a review March 21, 2026 12:58
@pfefferle pfefferle merged commit 249d2c8 into trunk Mar 21, 2026
7 checks passed
@pfefferle pfefferle deleted the fix/rel-me-fatal-wp7 branch March 21, 2026 13:12
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.

Fatal coming up in WP 7.0 testing

2 participants