]> khamidou — GitHub mirrors - arcanist.git/commit
Fix an DOMDocument error with NoseTestEngine running on PHP 7
authorMukunda Modell <mmodell@wikimedia.org>
Wed, 5 Oct 2016 20:19:15 +0000 (15:19 -0500)
committerMukunda Modell <mmodell@wikimedia.org>
Sun, 9 Oct 2016 21:28:51 +0000 (16:28 -0500)
commit2962504855413be1dce6f4bcffd6283bc657fb6f
tree2cd5ff935d14ea1bebc3a92719e2033d746a20dd
parent2ad15c499a00c7d8faabd961e3577a3cfd7d96ef
Fix an DOMDocument error with NoseTestEngine running on PHP 7

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

Reviewers: #blessed_reviewers!

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D16672
src/unit/engine/NoseTestEngine.php