Skip to content

mb_convert_encoding() throws error in PHP 8.1 #251

Open
@lazaruscorporation

Description

@lazaruscorporation

I'm getting the following error from the parser (running on PHP 8.1):

CRITICAL - 2023-10-13 13:56:58 --> mb_convert_encoding(): Argument #3 ($from_encoding) must specify at least one encoding
  in VENDORPATH/mf2/mf2/Mf2/Parser.php on line 96.
  1 VENDORPATH/mf2/mf2/Mf2/Parser.php(96): mb_convert_encoding()
  2 VENDORPATH/mf2/mf2/Mf2/Parser.php(365): Mf2\unicodeToHtmlEntities()
  3 VENDORPATH/indieweb/mention-client/src/IndieWeb/MentionClient.php(156): Mf2\Parser->__construct()
  ...

Looking at the comments on https://www.php.net/manual/en/function.mb-detect-encoding.php it seems like there have been some changes in the way mb_detect_encoding() works in PHP 8.1 - I'm not sure if this is the cause of the error I'm getting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions