Skip to content

PHP warning on non-character entriesΒ #254

@rxu

Description

@rxu

In rare cases when text contains some non-character symbols, PHP warning is thrown, f.e.:

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 161: DOMDocument::loadXML(): PCDATA invalid Char value 65534 in Entity, line: 36

or

Warning: DOMDocument::loadXML(): Char 0xFFFE out of allowed range in Entity, line: 8 in /home/mydomain/cableold/phpbb3/vendor/s9e/text-formatter/src/Utils.php on line 161
PHP Warning: DOMDocument::loadXML(): PCDATA invalid Char value 65534 in Entity, line: 8 in /home/mydomain/cableold/phpbb3/vendor/s9e/text-formatter/src/Utils.php on line 161

Example reports:
https://www.phpbb.com/community/viewtopic.php?t=2656027
https://www.phpbb.com/community/viewtopic.php?t=2651761
Recent report in phpBB Discord support channel: https://discord.com/channels/220192692573962241/508793734842941480/1444785568054509578

That may happen while handling entries like f.e. 0xFFFE or 0xFFFF.

It seems that is shouldn't generate PHP errors though if handled/escaped somehow by the library.

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