Page MenuHomePhabricator

Fix an DOMDocument error with NoseTestEngine running on PHP 7
ClosedPublic

Authored by 20after4 on Oct 5 2016, 8:23 PM.
Tags
None
Referenced Files
F18876655: D16672.diff
Nov 6 2025, 2:28 AM
F18854067: D16672.diff
Oct 31 2025, 9:31 PM
F18789494: D16672.id.diff
Oct 15 2025, 9:58 AM
F18788485: D16672.id40133.diff
Oct 15 2025, 5:05 AM
F18737066: D16672.id.diff
Oct 1 2025, 8:49 AM
F18724155: D16672.diff
Sep 30 2025, 2:59 AM
F18636349: D16672.id40173.diff
Sep 17 2025, 3:58 AM
F18620266: D16672.id40133.diff
Sep 15 2025, 4:42 AM

Details

Summary

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

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
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

src/unit/engine/NoseTestEngine.php
129–132

Nice work here

This revision was automatically updated to reflect the committed changes.