Skip to content

Alpine 3.21+ & newer libxml trows "Document is empty" errors when trying to unserialize empty body #9

@bertoost

Description

@bertoost

Hi,

We're running our application in an alpine versioned container with PHP 8.4 and we found a found a bug regarding new SimpleXmlElement() with an empty body.

The new versions will trigger an libxml error which wasn't there before.

It gives us the "Document is empty" error which is totally true and valid.
But maybe you should check the response before putting it in SimpleXml.

We do get this when we run a file-exists check. Which results in a 404 response, but the response shouldn't go through SimpleXmlElement() then.

Regards, Bert

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