Page MenuHomePhabricator

Fix an DOMDocument error with NoseTestEngine running on PHP 7

Authored by 20after4 on Oct 5 2016, 8:23 PM.
Referenced Files
Unknown Object (File)
Thu, Apr 11, 10:11 AM
Unknown Object (File)
Thu, Apr 11, 8:08 AM
Unknown Object (File)
Sat, Mar 30, 7:05 AM
Unknown Object (File)
Jan 6 2024, 4:19 PM
Unknown Object (File)
Dec 29 2023, 9:08 PM
Unknown Object (File)
Dec 16 2023, 10:25 PM
Unknown Object (File)
Dec 15 2023, 12:42 PM
Unknown Object (File)
Nov 30 2023, 4:29 AM



In php 7, DOMDocument::loadXML emits an error when supplied with
an empty string as input. For example, I got this error:

ERROR 2: DOMDocument::loadXML(): Empty string supplied as input

This change simply checks for empty and returns an empty array
rather than attempting to parse an empty xml document.

Test Plan

ran arc diff on a repo that uses nosetestengine

Diff Detail

rARC Arcanist
Lint Not Applicable
Tests Not Applicable

Event Timeline

20after4 retitled this revision from to Fix an DOMDocument error with NoseTestEngine running on PHP 7.
20after4 updated this object.
20after4 edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Oct 5 2016, 8:23 PM
wizsrk added a subscriber: wizsrk.

Please review this


Nice work here

This revision was automatically updated to reflect the committed changes.