Skip to content

Fix PHP 8.2 deprecation in rel parsing - #358

Open
pfefferle wants to merge 2 commits into
trunkfrom
fix/mb-convert-encoding
Open

pfefferle wants to merge 2 commits into
trunkfrom
fix/mb-convert-encoding

Conversation

@pfefferle

Copy link
Copy Markdown
Member

parse_html_rels() used mb_convert_encoding() with HTML-ENTITIES, which is deprecated since PHP 8.2 and shows up on every discovery of a URL. I replaced it with mb_encode_numericentity(), like the mf2 parser does since 0.5.1 (#357).

If mbstring is missing, the conversion is skipped instead of failing with a fatal error. The mf2 parser still needs mbstring, so this does not fully fix #156, but #354 adds a Site Health check for it.

For #156

Testing instructions

  • Run npm run test:wp-env, the deprecation no longer shows up.
  • Sign in with Web Sign-In and check that the endpoints of your site are found.

@pfefferle pfefferle self-assigned this Nov 15, 2026
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.

Check for Presence of mb_convert_encoding

1 participant