Azure / Azure/azure-storage-common-php
Alpine 3.21+ & newer libxml trows "Document is empty" errors when trying to unserialize empty body
- Dominant language
- PHP
- Stars
- 43
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Research direction
Because this release-only repository directs contributions to azure-storage-php, start there by locating the file-exists check and the new SimpleXmlElement() call. Reproduce the 404 case with an empty response, then verify that the response is handled before XML parsing and that the existing file-exists behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100